summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2013-12-11 09:51:05 +0200
committerGarren Smith <garren.smith@gmail.com>2013-12-11 09:51:05 +0200
commit9c641f1677f9d9cf27f3c76af803636d980c0929 (patch)
treeea857bd485137010f76b24a4fd7118ac9c17e0a8
parent0f3735887b80d6e057abade2703c99f81cd92ca5 (diff)
downloadcouchdb-9c641f1677f9d9cf27f3c76af803636d980c0929.tar.gz
Fauxton: remove icon list and hiding new view
-rw-r--r--src/fauxton/app/modules/documents/routes.js11
-rw-r--r--src/fauxton/app/modules/documents/views.js12
-rw-r--r--src/fauxton/app/templates/documents/index_menu_item.html2
-rw-r--r--src/fauxton/app/templates/documents/sidebar.html8
4 files changed, 4 insertions, 29 deletions
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index 56d21162b..9a4c4eeb5 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);
- }
}
});
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 83f8e55b8..de21010cd 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({});
diff --git a/src/fauxton/app/templates/documents/index_menu_item.html b/src/fauxton/app/templates/documents/index_menu_item.html
index cb9aaf0d8..1b141b292 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>
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 8fccc099b..156398d32 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>