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 dec5907
Date Tue, 19 Aug 2014 18:28:07 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes e28feffd0 -> dec590796


Add Unbinds to the global events on cleanup. This will fix that delete triggering the popup
a bunch of times issue


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

Branch: refs/heads/secondary-indexes
Commit: dec5907960e8b92b45811d3c6684cee87a55ccc1
Parents: e28feff
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Tue Aug 19 14:28:00 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Tue Aug 19 14:28:00 2014 -0400

----------------------------------------------------------------------
 app/addons/documents/templates/select-doc-menu.html |  5 +----
 app/addons/documents/views-advancedopts.js          |  6 ++++--
 app/addons/documents/views-sidebar.js               |  4 ++++
 app/addons/documents/views.js                       | 14 ++++++++++++++
 app/addons/fauxton/components.js                    |  4 ++++
 app/addons/indexes/views.js                         |  9 ++++++---
 6 files changed, 33 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dec59079/app/addons/documents/templates/select-doc-menu.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/select-doc-menu.html b/app/addons/documents/templates/select-doc-menu.html
index a00c851..44295c9 100644
--- a/app/addons/documents/templates/select-doc-menu.html
+++ b/app/addons/documents/templates/select-doc-menu.html
@@ -21,9 +21,6 @@ the License.
 
 <button class="button btn btn-small disabled js-bulk-delete"><i class="icon-trash"></i></button>
 
-<% if (expandDocs) { %>
+
 <button id="collapse" class="button btn btn-small"><i class="icon-minus"></i>
Collapse</button>
-<% } else { %>
-<button id="collapse" class="button btn btn-small"><i class="icon-plus"></i>
Expand</button>
-<% } %>
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dec59079/app/addons/documents/views-advancedopts.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-advancedopts.js b/app/addons/documents/views-advancedopts.js
index 993750f..75c00a9 100644
--- a/app/addons/documents/views-advancedopts.js
+++ b/app/addons/documents/views-advancedopts.js
@@ -66,7 +66,7 @@ function(app, FauxtonAPI, resizeColumns ) {
       $('#dashboard-content').scrollTop(0);
       this.$('#query-options-tray').toggle();
       FauxtonAPI.Events.trigger('APIbar:closeTray');
-    }, 
+    },
 
     closeTray: function(){
       $('#query-options-tray').hide();
@@ -278,7 +278,9 @@ function(app, FauxtonAPI, resizeColumns ) {
         }
       }, this);
     },
-
+    cleanup: function (){
+      FauxtonAPI.Events.unbind('AdvancedOptions:closeTray');
+    },
     serialize: function () {
       return {
         hasReduce: this.hasReduce,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dec59079/app/addons/documents/views-sidebar.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-sidebar.js b/app/addons/documents/views-sidebar.js
index a13a156..2977fbf 100644
--- a/app/addons/documents/views-sidebar.js
+++ b/app/addons/documents/views-sidebar.js
@@ -103,6 +103,10 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       },this);
     },
 
+    cleanup: function(){
+      FauxtonAPI.Events.unbind('database:delete');
+    },
+
     afterRender: function () {
       if (this.selectedTab) {
         this.setSelectedTab(this.selectedTab);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dec59079/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 446253a..8553d79 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -55,6 +55,11 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
       FauxtonAPI.Events.on('success:bulkDelete', this.selectAllMenu);
     },
 
+    cleanup:function(){
+      FauxtonAPI.Events.unbind('advancedOptions:updateView');
+      FauxtonAPI.Events.unbind('success:bulkDelete');
+    },
+
     selectAllMenu: function(e){
       FauxtonAPI.triggerRouteEvent("toggleSelectHeader");
       FauxtonAPI.Events.trigger("documents:show-select-all",this.selectVisible);
@@ -240,6 +245,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     className: function(){
       return (this.showSelect? "showSelect":"") + " all-docs-item doc-row";
     },
+
     initialize: function (options) {
       this.checked = options.checked;
       this.expanded = options.expanded;
@@ -250,6 +256,12 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
       FauxtonAPI.Events.on("documents:selectAll", this.selectAll);
     },
 
+    cleanup: function(){
+      FauxtonAPI.Events.unbind("documents:show-select-all");
+      FauxtonAPI.Events.unbind("documents:collapse");
+      FauxtonAPI.Events.unbind("documents:selectAll");
+    },
+
     showSelectBox: function(bool){
       this.$el.toggleClass('showSelect');
     },
@@ -535,6 +547,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     },
 
     cleanup: function () {
+      FauxtonAPI.Events.unbind("documents:bulkDelete");
+      FauxtonAPI.Events.unbind("documents:selectAll");
       this.pagination && this.pagination.remove();
       this.allDocsNumber && this.allDocsNumber.remove();
       _.each(this.rows, function (row) {row.remove();});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dec59079/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index e8bd559..afec0b4 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -140,6 +140,10 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.render();
     },
 
+    cleanup: function(){
+      FauxtonAPI.Events.unbind('APIbar:closeTray');
+    },
+
     afterRender: function(){
       ZeroClipboard.config({ moviePath: "/assets/js/plugins/zeroclipboard/ZeroClipboard.swf"
});
       var client = new ZeroClipboard(this.$(".copy-url"));

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dec59079/app/addons/indexes/views.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js
index f621e4b..a3e7c1c 100644
--- a/app/addons/indexes/views.js
+++ b/app/addons/indexes/views.js
@@ -70,6 +70,11 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         showStale: true
       }));
     },
+
+    cleanup: function(){
+      FauxtonAPI.Events.unbind('advancedOptions:updateView');
+    },
+
     hasReduce: function(){
 
     },
@@ -223,8 +228,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
   });
 
 
-
-
   Views.ViewEditor = FauxtonAPI.View.extend({
     template: "addons/indexes/templates/view_editor",
     builtinReduces: ['_sum', '_count', '_stats'],
@@ -233,7 +236,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       "click button.save": "saveView",
       "click button.delete": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
-      "click button.preview": "previewView",
       "click #db-views-tabs-nav": 'toggleIndexNav',
       "click .beautify_map":  "beautifyCode",
       "click .beautify_reduce":  "beautifyCode"
@@ -587,6 +589,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       targetEditor.setValue(beautifiedCode);
     },
     cleanup: function () {
+      FauxtonAPI.Events.unbind('index:delete');
       this.mapEditor && this.mapEditor.remove();
       this.reduceEditor && this.reduceEditor.remove();
     }


Mime
View raw message