couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [16/50] jquery-couch commit: updated refs/heads/import-master to 66dbcbf
Date Tue, 01 Apr 2014 08:52:21 GMT
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


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/commit/694e7332
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/tree/694e7332
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/diff/694e7332

Branch: refs/heads/import-master
Commit: 694e7332e95dc2056691e19a4b538b0b8e5a4aff
Parents: 7bffaf2
Author: Jason David Davies <jasondavies@apache.org>
Authored: Thu May 27 22:37:58 2010 +0000
Committer: Alexander Shorin <kxepal@gmail.com>
Committed: Thu May 27 22:37:58 2010 +0000

----------------------------------------------------------------------
 jquery.couch.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/blob/694e7332/jquery.couch.js
----------------------------------------------------------------------
diff --git a/jquery.couch.js b/jquery.couch.js
index b2c8e4a..99d97f5 100644
--- a/jquery.couch.js
+++ b/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"


Mime
View raw message