couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject git commit: updated refs/heads/master to 9c641f1
Date Wed, 11 Dec 2013 07:51:24 GMT
Updated Branches:
  refs/heads/master 0f3735887 -> 9c641f167


Fauxton: remove icon list and hiding new view


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

Branch: refs/heads/master
Commit: 9c641f1677f9d9cf27f3c76af803636d980c0929
Parents: 0f37358
Author: Garren Smith <garren.smith@gmail.com>
Authored: Wed Dec 11 09:51:05 2013 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Wed Dec 11 09:51:05 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/routes.js             | 11 -----------
 src/fauxton/app/modules/documents/views.js              | 12 +-----------
 .../app/templates/documents/index_menu_item.html        |  2 +-
 src/fauxton/app/templates/documents/sidebar.html        |  8 ++------
 4 files changed, 4 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/modules/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index 56d2116..9a4c4ee 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -198,9 +198,6 @@ function(app, FauxtonAPI, Documents, Databases) {
       }
 
       if (this.viewEditor) { this.viewEditor.remove(); }
-      
-      this.listenTo(this.data.database.allDocs, 'reset', this.checkExistingDocs);
-      this.listenTo(this.data.database.allDocs, 'remove', this.checkExistingDocs);
 
       this.toolsView = this.setView("#dashboard-upper-menu", new Documents.Views.JumpToDoc({
         database: this.data.database,
@@ -357,14 +354,6 @@ function(app, FauxtonAPI, Documents, Databases) {
       if (event && event.selectedTab) {
         this.sidebar.setSelectedTab(event.selectedTab);
       }
-    },
-
-    checkExistingDocs: function () {
-      if (this.data.database.allDocs.length > 0) {
-        this.sidebar.toggleNewView(true);
-      } else {
-        this.sidebar.toggleNewView(false);
-      }
     }
 
   });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/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 83f8e55..de21010 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1608,7 +1608,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
 
     initialize: function(options) {
       this.database = options.database;
-      this.showNewView = true;
       if (options.ddocInfo) {
         this.ddocID = options.ddocInfo.id;
         this.currView = options.ddocInfo.currView;
@@ -1647,7 +1646,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
         database: this.collection.database,
         database_url: '#' + this.database.url('app'), 
         docLinks: docLinks,
-        showNewView: this.showNewView,
         docLimit: Databases.DocLimit,
         addLinks: addLinks,
         extensionList: extensionList > 0
@@ -1696,15 +1694,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
       this.selectedTab = selectedTab;
       this.$('li').removeClass('active');
       this.$('#' + selectedTab).parent().addClass('active');
-    },
-
-    toggleNewView: function (show) {
-      // only render if there is a change
-      if (show !== this.showNewView) {
-        this.showNewView = show;
-        this.render();
-      }
-    },
+    }
   });
 
   Views.Indexed = FauxtonAPI.View.extend({});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/templates/documents/index_menu_item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/index_menu_item.html b/src/fauxton/app/templates/documents/index_menu_item.html
index cb9aaf0..1b141b2 100644
--- a/src/fauxton/app/templates/documents/index_menu_item.html
+++ b/src/fauxton/app/templates/documents/index_menu_item.html
@@ -13,5 +13,5 @@ the License.
 -->
 
 <a id="<%= ddoc %>_<%= index %>" href="#database/<%= database %>/_design/<%=
ddoc %>/_view/<%= index %>" class="toggle-view">
-  <i class="icon-list"></i> <%= ddoc %><span class="divider">/</span><%=
index %>
+  <%= ddoc %><span class="divider">/</span><%= index %>
 </a>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9c641f16/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 8fccc09..156398d 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -41,11 +41,9 @@ the License.
           <li>
           <a id="doc" href="#<%= database.url('app') %>/new">Document</a>
           </li>
-          <% if (showNewView) { %>
           <li>
           <a href="#<%= database.url('app') %>/new_view">Secondary Index</a>
           </li>
-          <% } %>
         </ul>
       </div>
         <button id="delete-database" class="btn"><i class="icon-trash"></i>
Database</button>
@@ -54,14 +52,12 @@ the License.
 
   <nav>
     <ul class="nav nav-list">
-      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>?limit=<%=
docLimit %>" class="toggle-view"><i class="icon-list"></i> All documents</a></li>
-      <li><a id="design-docs" href='#<%= database.url("index") %>?limit=<%=
docLimit %>&startkey="_design"&endkey="_e"'  class="toggle-view"><i class="icon-list"></i>
All design docs</a></li>
+      <li class="active"><a id="all-docs" href="#<%= database.url('index') %>?limit=<%=
docLimit %>" class="toggle-view"> All documents</a></li>
+      <li><a id="design-docs" href='#<%= database.url("index") %>?limit=<%=
docLimit %>&startkey="_design"&endkey="_e"'  class="toggle-view"> All design
docs</a></li>
     </ul>
     <ul class="nav nav-list views">
       <li class="nav-header">Secondary Indexes</li>
-      <% if (showNewView) { %>
       <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i
class="icon-plus"></i> New</a></li>
-      <% } %>
     </ul>
     <div id="extension-navs"></div>
   </nav>


Mime
View raw message