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 2014/08/06 23:03:30 UTC

fauxton commit: updated refs/heads/secondary-indexes to 16bb3e6

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes acfc49799 -> 16bb3e6a3


expand and collapse


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

Branch: refs/heads/secondary-indexes
Commit: 16bb3e6a3ae6e7dd104e3aa4c36e3479ff04f51c
Parents: acfc497
Author: deathbearbrown <de...@gmail.com>
Authored: Wed Aug 6 17:03:38 2014 -0400
Committer: deathbearbrown <de...@gmail.com>
Committed: Wed Aug 6 17:03:38 2014 -0400

----------------------------------------------------------------------
 app/addons/documents/templates/all_docs_item.html | 10 ++++++----
 app/addons/documents/views.js                     |  4 +++-
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16bb3e6a/app/addons/documents/templates/all_docs_item.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_item.html b/app/addons/documents/templates/all_docs_item.html
index 4526df2..4078918 100644
--- a/app/addons/documents/templates/all_docs_item.html
+++ b/app/addons/documents/templates/all_docs_item.html
@@ -13,7 +13,7 @@ the License.
 -->
 
 <div class="select"><input <%- checked ? 'checked="checked"' : '' %> type="checkbox" class="js-row-select"></div>
-<div class="doc-item">
+<div class="doc-item  ">
 
   <header>
     _id <span class="header-id-number">"<%=docID%>"</span>
@@ -25,8 +25,10 @@ the License.
     </div>
   <% } %>
   </header>
-  <div class="doc-data">
-    <pre class="prettyprint"><%- doc.prettyJSON() %></pre>
-  </div>
+  <% if (expanded){ %>
+    <div class="doc-data">
+      <pre class="prettyprint"><%- doc.prettyJSON() %></pre>
+    </div>
+  <% } %>
 </div>
 <div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16bb3e6a/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 7256e89..5b7a67b 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -1,4 +1,3 @@
-
 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
 // use this file except in compliance with the License. You may obtain a copy of
 // the License at
@@ -244,6 +243,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     className: "all-docs-item doc-row",
     initialize: function (options) {
       this.checked = options.checked;
+      this.expanded = options.expanded;
     },
 
     events: {
@@ -259,6 +259,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
     serialize: function() {
       return {
+        expanded: this.expanded,
         docID: this.model.get('_id'),
         doc: this.model,
         checked: this.checked
@@ -566,6 +567,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
         }
         this.rows[doc.id] = this.insertView("#doc-list", new this.nestedView({
           model: doc,
+          expanded: this.expandDocs,
           checked: isChecked
         }));
       }, this);