summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
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)
},