couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasondav...@apache.org
Subject svn commit: r949028 - /couchdb/trunk/share/www/script/jquery.couch.js
Date Thu, 27 May 2010 22:37:59 GMT
Author: jasondavies
Date: Thu May 27 22:37:58 2010
New Revision: 949028

URL: http://svn.apache.org/viewvc?rev=949028&view=rev
Log:
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.


Modified:
    couchdb/trunk/share/www/script/jquery.couch.js

Modified: couchdb/trunk/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.couch.js?rev=949028&r1=949027&r2=949028&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Thu May 27 22:37:58 2010
@@ -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