Author: jan
Date: Mon Sep 14 10:54:01 2009
New Revision: 814573
URL: http://svn.apache.org/viewvc?rev=814573&view=rev
Log:
enable multi-key-get in jquery.couch.js, patch by Benoit Chesneau, closes
COUHCDB-376
Modified:
couchdb/branches/0.10.x/share/www/script/jquery.couch.js
Modified: couchdb/branches/0.10.x/share/www/script/jquery.couch.js
URL:
http://svn.apache.org/viewvc/couchdb/branches/0.10.x/share/www/script/jquery.couch.js?rev=814573&r1=814572&r2=814573&view=diff
==============================================================================
--- couchdb/branches/0.10.x/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/branches/0.10.x/share/www/script/jquery.couch.js [utf-8] Mon Sep 14
10:54:01 2009
@@ -249,8 +249,20 @@
);
},
view: function(name, options) {
- name = name.split('/');
+ var name = name.split('/');
+ var options = options || {};
+ var type = "GET";
+ var data= null;
+ if (options["keys"]) {
+ type = "POST";
+ var keys = options["keys"];
+ delete options["keys"];
+ data = toJSON({ "keys": keys });
+ console.log(data);
+ }
ajax({
+ type: type,
+ data: data,
url: this.uri + "_design/" + name[0] +
"/_view/" + name[1] + encodeOptions(options)
},