From 082b833c6fff05c9aaff50c75eb38960737e8b5e Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sat, 19 Jun 2010 20:01:47 +0000 Subject: jquery.couch.js changes options handling git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@956282 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/jquery.couch.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index 292e3378..3dc5d1c5 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/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." ); -- cgit v1.2.3