couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r956282 - /couchdb/trunk/share/www/script/jquery.couch.js
Date Sat, 19 Jun 2010 20:01:48 GMT
Author: jchris
Date: Sat Jun 19 20:01:47 2010
New Revision: 956282

URL: http://svn.apache.org/viewvc?rev=956282&view=rev
Log:
jquery.couch.js changes options handling

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=956282&r1=956281&r2=956282&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Sat Jun 19 20:01:47 2010
@@ -231,7 +231,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) {
@@ -257,8 +257,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