couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r957965 - /couchdb/branches/0.11.x/share/www/script/jquery.couch.js
Date Fri, 25 Jun 2010 14:16:07 GMT
Author: jan
Date: Fri Jun 25 14:16:07 2010
New Revision: 957965

URL: http://svn.apache.org/viewvc?rev=957965&view=rev
Log:
Merge r956282 from trunk:

jquery.couch.js changes options handling

Modified:
    couchdb/branches/0.11.x/share/www/script/jquery.couch.js

Modified: couchdb/branches/0.11.x/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/share/www/script/jquery.couch.js?rev=957965&r1=957964&r2=957965&view=diff
==============================================================================
--- couchdb/branches/0.11.x/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/branches/0.11.x/share/www/script/jquery.couch.js [utf-8] Fri Jun 25 14:16:07 2010
@@ -213,7 +213,7 @@
           );
         },
         changes: function(since, options) {
-          options = {} || options;
+          options = options || {};
           // set up the promise object within a closure for this handler
           var db = this, active = true, listeners = [], promise = {
             onChange : function(fun) {
@@ -239,8 +239,13 @@
           };
           // actually make the changes request
           function getChangesSince(seq) {
+            var opts = {};
+            $.extend(opts, options, {
+              feed : "longpoll",
+              since : seq
+            });
             ajax(
-              {url: db.uri + "_changes?feed=longpoll&since="+seq},
+              {url: db.uri + "_changes"+encodeOptions(opts)},
               options,
               "Error connecting to "+db.uri+"/_changes."
             );



Mime
View raw message