Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28AC5C622 for ; Mon, 9 Sep 2013 08:41:10 +0000 (UTC) Received: (qmail 13665 invoked by uid 500); 9 Sep 2013 08:41:10 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 13541 invoked by uid 500); 9 Sep 2013 08:41:07 -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 13534 invoked by uid 99); 9 Sep 2013 08:41:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Sep 2013 08:41:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 68F659038F1; Mon, 9 Sep 2013 08:41:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: garren@apache.org To: commits@couchdb.apache.org Message-Id: <701c417e6bfa483a8a36828604aa4693@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/index-pagination to 1b8a115 Date: Mon, 9 Sep 2013 08:41:06 +0000 (UTC) Updated Branches: refs/heads/index-pagination 620d05a37 -> 1b8a1155f clean up unneeded methods Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1b8a1155 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1b8a1155 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1b8a1155 Branch: refs/heads/index-pagination Commit: 1b8a1155fd066b321472b45c3aef60338b14473c Parents: 620d05a Author: Garren Smith Authored: Mon Sep 9 10:40:37 2013 +0200 Committer: Garren Smith Committed: Mon Sep 9 10:40:37 2013 +0200 ---------------------------------------------------------------------- src/fauxton/app/modules/documents/resources.js | 8 ++++---- src/fauxton/app/modules/fauxton/paginate.js | 3 --- src/fauxton/test/core/paginateSpec.js | 14 -------------- 3 files changed, 4 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/1b8a1155/src/fauxton/app/modules/documents/resources.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js index a9e9836..065489e 100644 --- a/src/fauxton/app/modules/documents/resources.js +++ b/src/fauxton/app/modules/documents/resources.js @@ -302,7 +302,7 @@ function(app, FauxtonAPI) { that = this; this.viewMeta = { total_rows: resp.total_rows, - offest: resp.offset, + offset: resp.offset, update_seq: resp.update_seq }; return _.map(resp.rows, function(row) { @@ -322,7 +322,7 @@ function(app, FauxtonAPI) { initialize: function(_models, options) { this.database = options.database; - this.params = _.extend({limit: 10, reduce: false}, options.params); + this.params = _.extend({limit: 20, reduce: false}, options.params); this.idxType = "_view"; this.view = options.view; this.design = options.design.replace('_design/',''); @@ -450,7 +450,7 @@ function(app, FauxtonAPI) { this.rows = options.rows; this.view = options.view; this.design = options.design.replace('_design/',''); - this.params = _.extend({limit: 10, reduce: false}, options.params); + this.params = _.extend({limit: 20, reduce: false}, options.params); this.idxType = "_view"; }, @@ -464,7 +464,7 @@ function(app, FauxtonAPI) { this.viewMeta = { total_rows: this.rows.length, - offest: 0, + offset: 0, update_seq: false }; http://git-wip-us.apache.org/repos/asf/couchdb/blob/1b8a1155/src/fauxton/app/modules/fauxton/paginate.js ---------------------------------------------------------------------- diff --git a/src/fauxton/app/modules/fauxton/paginate.js b/src/fauxton/app/modules/fauxton/paginate.js index a32bbbe..6dbaa6f 100644 --- a/src/fauxton/app/modules/fauxton/paginate.js +++ b/src/fauxton/app/modules/fauxton/paginate.js @@ -49,7 +49,6 @@ function(app, FauxtonAPI) { "click a#previous": 'previousClicked' }, - currentDirection: 'next', previousIds: [], scrollTo: function () { @@ -68,13 +67,11 @@ function(app, FauxtonAPI) { previousClicked: function (event) { event.preventDefault(); - this.currentDirection = 'previous'; FauxtonAPI.navigate(this.previousUrlfn()); }, nextClicked: function (event) { event.preventDefault(); - this.currentDirection = 'next'; this.previousIds.push(this.collection.first().id); FauxtonAPI.navigate(this.nextUrlfn()); }, http://git-wip-us.apache.org/repos/asf/couchdb/blob/1b8a1155/src/fauxton/test/core/paginateSpec.js ---------------------------------------------------------------------- diff --git a/src/fauxton/test/core/paginateSpec.js b/src/fauxton/test/core/paginateSpec.js index 6b7bfb6..4139248 100644 --- a/src/fauxton/test/core/paginateSpec.js +++ b/src/fauxton/test/core/paginateSpec.js @@ -56,13 +56,6 @@ define([ describe('#next', function () { - it('should set direction as next', function () { - paginate.$('a#next').click(); - - assert.equal(paginate.currentDirection, 'next'); - - }); - it('Should navigate', function () { var navigateMock = sinon.spy(FauxtonAPI, 'navigate'); @@ -77,13 +70,6 @@ define([ describe('#previous', function () { - it('should set direction as next', function () { - paginate.$('a#previous').click(); - - assert.equal(paginate.currentDirection, 'previous'); - - }); - it('Should navigate', function () { var navigateMock = sinon.spy(FauxtonAPI, 'navigate');