You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2013/09/09 10:41:06 UTC

git commit: updated refs/heads/index-pagination to 1b8a115

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 <ga...@gmail.com>
Authored: Mon Sep 9 10:40:37 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
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');