diff options
author | BigBlueHat <byoung@bigbluehat.com> | 2013-11-14 16:08:29 -0800 |
---|---|---|
committer | suelockwood <deathbearbrown@gmail.com> | 2013-11-18 13:21:11 -0500 |
commit | 4db0f6815e5778b4d463cf8bd48d29360d060648 (patch) | |
tree | 20e000a3b9b342989f00634701f8008c18f1648a | |
parent | 087c0fe6268d81e3a59de86530e9be511e85de9f (diff) | |
download | couchdb-4db0f6815e5778b4d463cf8bd48d29360d060648.tar.gz |
toggling delete docs button on Select All
Also preventing "delete 0 docs" confirm box.
-rw-r--r-- | src/fauxton/app/modules/documents/views.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js index b76d238e8..1e426f82b 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; } |