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 2013/11/18 19:19:20 UTC

[2/3] git commit: updated refs/heads/pr/105 to 31b1ff5

toggling delete docs button on Select All

Also preventing "delete 0 docs" confirm box.


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

Branch: refs/heads/pr/105
Commit: 99f09b78868e75cbe90a6cd31bb3034ed87b4d85
Parents: 179710a
Author: BigBlueHat <by...@bigbluehat.com>
Authored: Thu Nov 14 16:08:29 2013 -0800
Committer: BigBlueHat <by...@bigbluehat.com>
Committed: Thu Nov 14 16:16:59 2013 -0800

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/99f09b78/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index b76d238..1e426f8 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -573,7 +573,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
     },
 
     selectAll: function(evt){
-      $("input:checkbox").prop('checked', !$(evt.target).hasClass('active'));
+      $("input:checkbox").prop('checked', !$(evt.target).hasClass('active')).trigger('change');
     },
 
     serialize: function() {
@@ -619,7 +619,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, resizeColumns) {
                          .map(function(e) { return $(this).attr("data-id"); })
                          .get();
 
-      if (!window.confirm("Are you sure you want to delete these " + eles.length + " docs?")) {
+      if (eles.length === 0 || !window.confirm("Are you sure you want to delete these " + eles.length + " docs?")) {
         return false;
       }