From 9b7b00743715ea0a1bf3fabfa534845c50514534 Mon Sep 17 00:00:00 2001 From: Jason David Davies Date: Thu, 27 May 2010 22:37:58 +0000 Subject: 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 --- share/www/script/jquery.couch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'share') 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" -- cgit v1.2.3