couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject fauxton commit: updated refs/heads/secondary-indexes to f7081e4
Date Mon, 11 Aug 2014 18:42:15 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes 0ff0185c0 -> f7081e448


Hooked up Delete DB  & event handling in menuDropDown


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

Branch: refs/heads/secondary-indexes
Commit: f7081e448a955e2dcb20617d2ab1d61f90813781
Parents: 0ff0185
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Mon Aug 11 14:42:21 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Mon Aug 11 14:42:21 2014 -0400

----------------------------------------------------------------------
 app/addons/documents/views-sidebar.js           | 2 ++
 app/addons/fauxton/components.js                | 4 ++--
 app/addons/fauxton/templates/menu_dropdown.html | 2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f7081e44/app/addons/documents/views-sidebar.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-sidebar.js b/app/addons/documents/views-sidebar.js
index 72a383f..ab649b7 100644
--- a/app/addons/documents/views-sidebar.js
+++ b/app/addons/documents/views-sidebar.js
@@ -32,11 +32,13 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
     },
 
     initialize: function(options) {
+      _.bindAll(this);
       this.database = options.database;
       if (options.ddocInfo) {
         this.ddocID = options.ddocInfo.id;
         this.currView = options.ddocInfo.currView;
       }
+      FauxtonAPI.Events.on('database:delete', this.showDeleteDatabaseModal)
     },
     showDeleteDatabaseModal: function(event){
       this.deleteDBModal.showModal();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f7081e44/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index ed8ee57..60d0c26 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -761,8 +761,8 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
     },
     triggerEvent: function(e){
       e.preventDefault();
-
-      console.log('works');
+      var eventTrigger = $(e.currentTarget).attr('triggerEvent');
+      FauxtonAPI.Events.trigger(eventTrigger);
     },
     update: function(links){
       this.links = links;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f7081e44/app/addons/fauxton/templates/menu_dropdown.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/menu_dropdown.html b/app/addons/fauxton/templates/menu_dropdown.html
index d1e96af..01c4ed9 100644
--- a/app/addons/fauxton/templates/menu_dropdown.html
+++ b/app/addons/fauxton/templates/menu_dropdown.html
@@ -21,11 +21,13 @@ the License.
     <% _.each(linkSection.links, function (link) { %>
       <li>
         <a
+          <% if (link.trigger){ %> data-bypass="true" triggerEvent="<%-link.trigger%>"
<%}%>
           <% if (link.icon) { %>
           class="icon <%- link.icon %>"
           <% } %>
           href="<%- link.url %>">
           <%- link.title %>
+
         </a>
       <li>
     <%});%>


Mime
View raw message