You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2010/06/25 16:16:07 UTC
svn commit: r957965 -
/couchdb/branches/0.11.x/share/www/script/jquery.couch.js
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."
);