couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [2/3] git commit: updated refs/heads/master to 109cef8
Date Mon, 18 Nov 2013 18:22:05 GMT
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/4db0f681
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/4db0f681
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/4db0f681

Branch: refs/heads/master
Commit: 4db0f6815e5778b4d463cf8bd48d29360d060648
Parents: 087c0fe
Author: BigBlueHat <byoung@bigbluehat.com>
Authored: Thu Nov 14 16:08:29 2013 -0800
Committer: suelockwood <deathbearbrown@gmail.com>
Committed: Mon Nov 18 13:21:11 2013 -0500

----------------------------------------------------------------------
 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/4db0f681/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;
       }
 


Mime
View raw message