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/10 16:03:59 UTC
[13/14] git commit: updated refs/heads/index-pagination to db85b98
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/d7d91ac3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/d7d91ac3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/d7d91ac3
Branch: refs/heads/index-pagination
Commit: d7d91ac38e5155d848e483328a50f2ff7ca4f10d
Parents: a067994
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Sep 9 10:40:37 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Sep 10 09:41:13 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/d7d91ac3/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/d7d91ac3/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/d7d91ac3/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');