Commits

Anonymous committed 6bf0b83

enable multi-key-get in jquery.couch.js, patch by Benoit Chesneau, closes COUHCDB-376

  • Participants
  • Parent commits fed64ec

Comments (0)

Files changed (1)

File share/www/script/jquery.couch.js

           );
         },
         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)
             },