Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 44029 invoked from network); 19 Jun 2010 20:02:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Jun 2010 20:02:35 -0000 Received: (qmail 23746 invoked by uid 500); 19 Jun 2010 20:02:35 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 23677 invoked by uid 500); 19 Jun 2010 20:02:34 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 23670 invoked by uid 99); 19 Jun 2010 20:02:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jun 2010 20:02:34 +0000 X-ASF-Spam-Status: No, hits=-1643.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jun 2010 20:02:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3774123889E2; Sat, 19 Jun 2010 20:01:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r956282 - /couchdb/trunk/share/www/script/jquery.couch.js Date: Sat, 19 Jun 2010 20:01:48 -0000 To: commits@couchdb.apache.org From: jchris@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100619200148.3774123889E2@eris.apache.org> 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." );