You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2013/09/26 20:53:16 UTC
[7/8] git commit: updated refs/heads/replicator-redesign to d00027f
Fauxton: bug fixes on views
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c7249d02
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c7249d02
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c7249d02
Branch: refs/heads/replicator-redesign
Commit: c7249d0287c749e0b0c86941f29e62ed331bdf5f
Parents: 87ed627
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Sep 25 17:38:24 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Sep 25 17:39:29 2013 +0200
----------------------------------------------------------------------
src/fauxton/app/modules/documents/resources.js | 8 ++++++++
src/fauxton/app/modules/documents/views.js | 3 +--
2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/c7249d02/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 de27ab0..bbacb0f 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -98,6 +98,10 @@ function(app, FauxtonAPI) {
reduce: reduce
};
} else {
+ if (!views[view]) {
+ views[view] = {};
+ }
+
views[view].map = map;
}
@@ -515,6 +519,10 @@ function(app, FauxtonAPI) {
return deferred;
},
+ recordStart: function () {
+ return 1;
+ },
+
totalRows: function() {
return this.viewMeta.total_rows || "unknown";
},
http://git-wip-us.apache.org/repos/asf/couchdb/blob/c7249d02/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 02abff7..8036195 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -537,8 +537,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
return true;
},
canShowNextfn: function () {
-
- if ((collection.viewMeta.offset + collection.length + 2) >= collection.viewMeta.total_rows) {
+ if (collection.length === 0 || (collection.viewMeta.offset + collection.length + 2) >= collection.viewMeta.total_rows) {
return false;
}