couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [24/50] jquery-couch commit: updated refs/heads/import-master to 66dbcbf
Date Tue, 01 Apr 2014 08:52:29 GMT
jquery.couch.js changes options handling

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@956282 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/deaacf09
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/tree/deaacf09
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/diff/deaacf09

Branch: refs/heads/import-master
Commit: deaacf0953007811015144a44ce0870288918225
Parents: 5a4d48a
Author: John Christopher Anderson <jchris@apache.org>
Authored: Sat Jun 19 20:01:47 2010 +0000
Committer: Alexander Shorin <kxepal@gmail.com>
Committed: Sat Jun 19 20:01:47 2010 +0000

----------------------------------------------------------------------
 jquery.couch.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/blob/deaacf09/jquery.couch.js
----------------------------------------------------------------------
diff --git a/jquery.couch.js b/jquery.couch.js
index 9193860..e128c22 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -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