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 57d408c
Date Fri, 08 Aug 2014 18:29:28 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes 29a66d60e -> 57d408c0d


fix events on select doc header


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

Branch: refs/heads/secondary-indexes
Commit: 57d408c0d7264828d79690390273925210cc87e4
Parents: 29a66d6
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Fri Aug 8 14:29:33 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Fri Aug 8 14:29:33 2014 -0400

----------------------------------------------------------------------
 app/addons/documents/views.js | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/57d408c0/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 870a3dc..58a6c73 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -201,8 +201,10 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     bulkDelete: function(){
       FauxtonAPI.Events.trigger("documents:bulkDelete");
     },
-    selectAll: function(){
-      FauxtonAPI.Events.trigger("documents:selectAll");
+    selectAll: function(evt){
+      this.$(evt.target).toggleClass('active');
+
+      FauxtonAPI.Events.trigger("documents:selectAll", this.$(evt.target).hasClass('active'));
     },
     collapse: function(){
       FauxtonAPI.Events.trigger("documents:collapse");
@@ -261,7 +263,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
       _.bindAll(this);
       FauxtonAPI.Events.on("documents:select-all", this.showSelect);
     },
-    showSelect: function(){
+    showSelect: function(bool){
+      this.showSelect = bool;
       this.$('.select').toggle();
     },
     events: {
@@ -506,8 +509,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
       });
     },
 
-    selectAll: function(evt){
-      $('#doc-list').find("input:checkbox").prop('checked', !$(evt.target).hasClass('active')).trigger('change');
+    selectAll: function(checked){
+      this.$el.find("input:checkbox").prop('checked', checked).trigger('click');
     },
 
     serialize: function() {
@@ -519,8 +522,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     },
 
     collapse: function (event) {
-      event.preventDefault();
-
       if (this.expandDocs) {
         this.expandDocs = false;
       } else {


Mime
View raw message