summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-06-19 20:01:47 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-06-19 20:01:47 +0000
commit082b833c6fff05c9aaff50c75eb38960737e8b5e (patch)
tree5b84d3b0849e25a1af47525ad7fda34346346f12
parent7450d192bb39c2c3f051a9e8606340abad16b5e5 (diff)
jquery.couch.js changes options handling
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@956282 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/jquery.couch.js9
1 files changed, 7 insertions, 2 deletions
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."
);