]> git.datanom.net - qtadmin.git/blobdiff - js/checkbox.js
add more debug info
[qtadmin.git] / js / checkbox.js
index d2d516c9663254df9b5d5d3fa80d54a49d0ae1eb..0bdce8ea512979287a341773c629ac776d79598e 100644 (file)
@@ -1,6 +1,6 @@
 /* vim: set ts=4 tw=4 sw=4 noet: */
 
-function checkAction() {
+function checkAction(action) {
     var ids = '';
     var c = document.getElementsByName('action');
     for (var i = 0; i < c.length; i++) {
@@ -12,6 +12,16 @@ function checkAction() {
             }
         }
     }
-    var url = 'quarantine.php?op=release&id=' + ids;
+    var url = 'quarantine.php?op=' + action + '&id=' + ids;
     location.href=url;
 }
+
+function updateAction(chkBtn) {
+    var checked = chkBtn.checked;
+    var c = document.getElementsByName('action');
+    for (var i = 0; i < c.length; i++) {
+        if (c[i].type == 'checkbox' && c[i].checked != checked) {
+            c[i].checked = checked;
+        }
+    }
+}
This page took 0.029035 seconds and 5 git commands to generate.