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/25 17:40:54 UTC

[1/2] git commit: updated refs/heads/master to c7249d0

Updated Branches:
  refs/heads/master 8de942f2d -> c7249d028


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/master
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;
           }
 


[2/2] git commit: updated refs/heads/master to c7249d0

Posted by ga...@apache.org.
Fauxton: Fix changes table spacing


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

Branch: refs/heads/master
Commit: 87ed627fdbfd0514a3a15c8c5315f82ff20a1b2e
Parents: 8de942f
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Sep 25 17:02:53 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Sep 25 17:39:29 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/templates/documents/changes.html |  8 ++++----
 src/fauxton/assets/less/database.less            | 12 ++++++++++++
 2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/87ed627f/src/fauxton/app/templates/documents/changes.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/changes.html b/src/fauxton/app/templates/documents/changes.html
index 5a29644..9408979 100644
--- a/src/fauxton/app/templates/documents/changes.html
+++ b/src/fauxton/app/templates/documents/changes.html
@@ -12,12 +12,12 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 
-<table class="table">
+<table id="changes-table" class="table">
   <thead>
-    <th> seq </th>
+    <th id="seq"> seq </th>
     <th> id </th>
-    <th> changes </th>
-    <th> deleted? </th>
+    <th id="changes"> changes </th>
+    <th id="deleted"> deleted? </th>
   </thead>
   <tbody>
   <% _.each(changes, function (change) { %>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/87ed627f/src/fauxton/assets/less/database.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/database.less b/src/fauxton/assets/less/database.less
index 03c0d7f..4b11427 100644
--- a/src/fauxton/assets/less/database.less
+++ b/src/fauxton/assets/less/database.less
@@ -224,3 +224,15 @@ table.active-tasks{
         }
     }
 }
+table#changes-table {
+
+  #changes {
+    width: 50%;
+  }
+
+  #seq, #deleted {
+    width: 5%;
+  }
+
+}
+