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/07/23 21:24:43 UTC

[34/64] [abbrv] fauxton commit: updated refs/heads/secondary-indexes to ef01e24

Sidebar UI - design doc oriented


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

Branch: refs/heads/secondary-indexes
Commit: 3577cdb74957c81d624bac64d6a8b8bb6decf7a6
Parents: 4aa9e32
Author: suelockwood <de...@apache.org>
Authored: Fri Apr 18 11:25:43 2014 -0400
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 22 16:56:12 2014 +0200

----------------------------------------------------------------------
 .../templates/add_new_ddoc_fn_dropdown.html     | 31 ++++++++++++++++++++
 .../documents/templates/design_doc_menu.html    |  2 +-
 app/addons/documents/views.js                   | 25 ++++++++++++++++
 3 files changed, 57 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3577cdb7/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html b/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
new file mode 100644
index 0000000..77323a9
--- /dev/null
+++ b/app/addons/documents/templates/add_new_ddoc_fn_dropdown.html
@@ -0,0 +1,31 @@
+<!--
+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
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div class="dropdown">
+	<a class="dropdown-toggle icon fonticon-circle-plus" data-toggle="dropdown" href="#" data-bypass="true"></a>
+	<ul class="dropdown-menu arrow" role="menu" aria-labelledby="dLabel">
+		<% if (full){ %>
+			<li><a class="icon fonticon-replication" href="#replicate/<%=database.id%>">Replicate</a><li>
+			<li><a class="icon fonticon-trash" href="#" data-bypass="true">Delete</a><li>
+		<%}%>
+		<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_show/<%=ddocSafe%>">Show 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-fauxton/blob/3577cdb7/app/addons/documents/templates/design_doc_menu.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/design_doc_menu.html b/app/addons/documents/templates/design_doc_menu.html
index ae23dc7..1227d33 100644
--- a/app/addons/documents/templates/design_doc_menu.html
+++ b/app/addons/documents/templates/design_doc_menu.html
@@ -13,7 +13,7 @@ the License.
 -->
 <li class="nav-header">
 	
-	<div  class="js-collapse-toggle accordion-header" data-toggle="collapse" data-target="#<%= ddoc_clean %>" id="nav-header-<%= ddoc_clean %>" >
+	<div  class="js-collapse-toggle accordion-header" data-toggle="collapse" data-target="#<%- ddoc_clean %>" id="nav-header-<%- ddoc_clean %>" >
 		<div class="accordion-list-item">
 			<div class="fonticon-play"></div>
 			<p><%- designDoc%></p>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/3577cdb7/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index c88ff39..461ceec 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -1833,6 +1833,31 @@ function(app, FauxtonAPI, Components, Documents, Views, Databases, pouchdb,
     }
   });
 
+
+  Views.newMenuDropdown = FauxtonAPI.View.extend({
+    template: "addons/documents/templates/add_new_ddoc_fn_dropdown",
+    tagName: "div",
+    className: "dropdown",
+    initialize: function(options){
+      this.database = options.database;
+      this.fullMenu = options.fullMenu;
+      this.ddocSafeName = options.ddocSafeName || "";
+    },
+    serialize: function(){
+      var sidebarItem = FauxtonAPI.getExtensions('sidebar:links');
+      return {
+        extensionLinks: sidebarItem,
+        database: this.database,
+        ddocSafe: this.ddocSafeName,
+        full:  this.fullMenu
+      };
+    }
+  });
+
+
+  Views.temp = FauxtonAPI.View.extend({
+  });
+
   Views.DdocInfo = FauxtonAPI.View.extend({
     template: "addons/documents/templates/ddoc_info",