afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-07-05 10:18 am

[dw-free] refreshing Inbox page doesn't clear checked "check all" checkbox if not all item

[commit: http://hg.dwscoalition.org/dw-free/rev/3f72ba1db1b5]

http://bugs.dwscoalition.org/show_bug.cgi?id=313

Deselect the check all checkboxes when loading the page and when deleting
items.

Patch by [personal profile] afuna.

Files modified:
  • htdocs/inbox/index.bml
  • htdocs/js/esn_inbox.js
--------------------------------------------------------------------------------
diff -r 067c3657fffa -r 3f72ba1db1b5 htdocs/inbox/index.bml
--- a/htdocs/inbox/index.bml	Sun Jul 05 10:14:03 2009 +0000
+++ b/htdocs/inbox/index.bml	Sun Jul 05 10:17:26 2009 +0000
@@ -210,6 +210,7 @@ function setup (e) {
                   "button": $(name + "_CheckAll_" + i),
                   "parent": tableview.getView()
             });
+            checkallButton.button.checked = false;
         }
     }
 
diff -r 067c3657fffa -r 3f72ba1db1b5 htdocs/js/esn_inbox.js
--- a/htdocs/js/esn_inbox.js	Sun Jul 05 10:14:03 2009 +0000
+++ b/htdocs/js/esn_inbox.js	Sun Jul 05 10:17:26 2009 +0000
@@ -190,6 +190,12 @@ ESN_Inbox.deleteItems = function (evt, f
     if (has_bookmark && msg && !confirm(msg)) return false;
 
     ESN_Inbox.updateItems('delete', evt, folder, '');
+
+    // uncheck the checkbox after deleting anything
+    for (var i=1; i<=2; i++) {
+        $(folder + "_CheckAll_" + i).checked = false;
+    }
+
     return false;
 };
 
--------------------------------------------------------------------------------