couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject couchdb commit: updated refs/heads/Update-Sidebar-Ui to ea377c1
Date Tue, 15 Apr 2014 19:45:40 GMT
Repository: couchdb
Updated Branches:
  refs/heads/Update-Sidebar-Ui 9ec10a453 -> ea377c19f


Extensions for the menu and commented out the links to the functions we don't have UIs for
yet.


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

Branch: refs/heads/Update-Sidebar-Ui
Commit: ea377c19fabb3d7435d1328188fbcddb5a278b72
Parents: 9ec10a4
Author: suelockwood <deathbear@apache.org>
Authored: Tue Apr 15 15:15:35 2014 -0400
Committer: suelockwood <deathbear@apache.org>
Committed: Tue Apr 15 15:45:01 2014 -0400

----------------------------------------------------------------------
 .../templates/add_new_ddoc_fn_dropdown.html         |  7 +++++--
 src/fauxton/app/addons/documents/views.js           | 16 ++++++++++++++--
 2 files changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/ea377c19/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html b/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
index daf3864..77323a9 100644
--- a/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
+++ b/src/fauxton/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
@@ -21,8 +21,11 @@ the License.
 		<%}%>
 		<li class="header-label">Add new</li>
 		<li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_view/<%=ddocSafe%>">Secondary
View</a><li>
-	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_filter/<%=ddocSafe%>">Filter
Function</a><li>
+<!-- 	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app')
%>/new_filter/<%=ddocSafe%>">Filter Function</a><li>
 	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_show/<%=ddocSafe%>">Show
Function</a><li>
-	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_list/<%=ddocSafe%>">List
function</a><li>
+	  <li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/new_list/<%=ddocSafe%>">List
function</a><li> -->
+	  <% _.each(extensionLinks, function(link) { %>
+			<li><a class="icon fonticon-circle-plus" href="#<%= database.url('app') %>/<%=link.url%>/<%=ddocSafe%>"><%=link.title%></a><li>
+    <%});%>
 	</ul>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ea377c19/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index abac4db..4e08a64 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -1916,8 +1916,19 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
 
     setSelectedTab: function (selectedTab) {
       this.selectedTab = selectedTab;
+      var $selectedTab = this.$('#' + selectedTab);
+
       this.$('li').removeClass('active');
-      this.$('#' + selectedTab).parent().addClass('active');
+      $selectedTab.parent().addClass('active');
+
+      if ($selectedTab.parents(".accordion-body").length !== 0){
+        $selectedTab
+        .parents(".accordion-body")
+        .addClass("in")
+        .parents(".nav-header")
+        .find(".js-collapse-toggle").addClass("down");
+      }
+
     }
   });
 
@@ -2027,7 +2038,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
       this.ddocSafeName = options.ddocSafeName || "";
     },
     serialize: function(){
+      var sidebarItem = FauxtonAPI.getExtensions('sidebar:links');
       return {
+        extensionLinks: sidebarItem,
         database: this.database,
         ddocSafe: this.ddocSafeName,
         full:  this.fullMenu
@@ -2036,7 +2049,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
   });
 
 
-
   Views.temp = FauxtonAPI.View.extend({
   });
 


Mime
View raw message