You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2014/10/29 16:04:29 UTC

fauxton commit: updated refs/heads/master to a021dd6

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master fcdedc7cf -> a021dd641


Use a constant for pagesize


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

Branch: refs/heads/master
Commit: a021dd641570fc88d79e1333dba9332ef8794863
Parents: fcdedc7
Author: Robert Kowalski <ro...@apache.org>
Authored: Wed Oct 29 16:02:36 2014 +0100
Committer: Robert Kowalski <ro...@apache.org>
Committed: Wed Oct 29 16:02:47 2014 +0100

----------------------------------------------------------------------
 app/addons/documents/routes-documents.js | 2 +-
 app/constants.js                         | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a021dd64/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index b885f33..013a26d 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -363,7 +363,7 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases, Resou
           collection;
 
       isLazyInit = _.isUndefined(this.documentsView) || _.isUndefined(this.documentsView.allDocsNumber);
-      defaultPageSize = isLazyInit ? 20 : this.documentsView.perPage();
+      defaultPageSize = isLazyInit ? FauxtonAPI.constants.DEFAULT_PAGE_SIZE : this.documentsView.perPage();
       docParams.limit = pageSize = this.getDocPerPageLimit(urlParams, defaultPageSize);
 
       if (event.allDocs) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a021dd64/app/constants.js
----------------------------------------------------------------------
diff --git a/app/constants.js b/app/constants.js
index e52e379..a316154 100644
--- a/app/constants.js
+++ b/app/constants.js
@@ -10,10 +10,11 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([], function() {
+define([], function () {
 
   var constants = {
-    TRAY_TOGGLE_SPEED: 250
+    TRAY_TOGGLE_SPEED: 250,
+    DEFAULT_PAGE_SIZE: 20
   };
 
   return constants;