summaryrefslogtreecommitdiff
path: root/share/www/script
diff options
context:
space:
mode:
authorJason David Davies <jasondavies@apache.org>2010-05-27 22:37:58 +0000
committerJason David Davies <jasondavies@apache.org>2010-05-27 22:37:58 +0000
commit9b7b00743715ea0a1bf3fabfa534845c50514534 (patch)
tree1b70d2572e3b8e2a2fbc3fc907354a13e56a931d /share/www/script
parent86f01e87950678949123c8e49bcc225d30d3ba80 (diff)
Fix some bugs in jquery.couch.js.
Namely: * openDoc() was inadvertently adding a ?beforeSuccess=... parameter to the URL. * bulkSave() wasn't sending a POST body. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@949028 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script')
-rw-r--r--share/www/script/jquery.couch.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index d3d73671..4c42211c 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -271,7 +271,7 @@
openDoc: function(docId, options, ajaxOptions) {
options = options || {};
if (db_opts.attachPrevRev || options.attachPrevRev) {
- $.extend(options, {
+ $.extend(ajaxOptions, {
beforeSuccess : function(req, doc) {
rawDocs[doc._id] = {
rev : doc._rev,
@@ -280,7 +280,7 @@
}
});
} else {
- $.extend(options, {
+ $.extend(ajaxOptions, {
beforeSuccess : function(req, doc) {
if (doc["jquery.couch.attachPrevRev"]) {
rawDocs[doc._id] = {
@@ -344,7 +344,7 @@
ajax({
type: "POST",
url: this.uri + "_bulk_docs" + encodeOptions(options),
- data: toJSON(docs)
+ contentType: "application/json", data: toJSON(docs)
},
options,
"The documents could not be saved"