summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2009-09-13 17:53:57 +0000
committerJan Lehnardt <jan@apache.org>2009-09-13 17:53:57 +0000
commit779b8a8d2f9204546db0cc41cc36830504b50c0a (patch)
treeb9f1226f9ed070130feeddfd483f48162176de8d /share/www/script
parentc1f2441020fcba500821981013144aff1fd8f8b9 (diff)
enable multi-key-get in jquery.couch.js, patch by Benoit Chesneau, closes COUHCDB-376
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814364 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/jquery.couch.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 4cf2d196..8c5848bc 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -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)
},