couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [33/34] couchdb commit: updated refs/heads/paginate-api-options to b63c791
Date Mon, 03 Mar 2014 16:58:45 GMT
Fix page count on perPage change


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7df61e79
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7df61e79
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7df61e79

Branch: refs/heads/paginate-api-options
Commit: 7df61e79084a4a63ef0661d2e5eac556f6b8f5d4
Parents: cf7a92a
Author: Garren Smith <garren.smith@gmail.com>
Authored: Mon Mar 3 11:31:26 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Mar 3 11:31:26 2014 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/fauxton/components.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7df61e79/src/fauxton/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/fauxton/components.js b/src/fauxton/app/addons/fauxton/components.js
index 01ee4a9..1174193 100644
--- a/src/fauxton/app/addons/fauxton/components.js
+++ b/src/fauxton/app/addons/fauxton/components.js
@@ -158,8 +158,7 @@ function(app, FauxtonAPI, ace, spin) {
     },
 
     updatePerPage: function (newPerPage) {
-      var docsView = this.page() + newPerPage;
-      this.currentPage = Math.ceil(docsView / newPerPage);
+      this.setDefaults();
       this.perPage = newPerPage;
     },
 


Mime
View raw message