]> git.datanom.net - qtadmin.git/commitdiff
add multicheck
authorMichael Rasmussen <mir@datanom.net>
Wed, 3 Jun 2015 20:57:38 +0000 (22:57 +0200)
committerMichael Rasmussen <mir@datanom.net>
Wed, 3 Jun 2015 20:57:38 +0000 (22:57 +0200)
index.php
js/checkbox.js

index 1dc0606ee3fcd1d34a3dc609b579ef757118b472..396e1190a6d391335a645c5fd632d529202c6d26 100644 (file)
--- a/index.php
+++ b/index.php
@@ -33,7 +33,9 @@
         echo "<span class=\"total-rows\">$numrows quarantined mail(s)</span>";
         echo "<table><tr>";
         echo "<table><tr><th>Received</th><th>Cause</th>";
-        echo "<th>Sender</th><th>Recipient</th><th>Subject</th><th>Action</th><th></th>";
+        echo "<th>Sender</th><th>Recipient</th><th>Subject</th><th>Action</th>"
+        echo "<th><input name=\"multiselect\" type=\"checkbox\"
+              onchange=\"javascript: updateAction(this)\" /></th>";
         echo "</tr>";
 
         $mailInfo = array();
index da738c243a077f6c5610540474bc76cf95c89dee..ca9170fd8abeba93b836319d9c5e87c7cb416b20 100644 (file)
@@ -15,3 +15,13 @@ function checkAction(action) {
     var url = 'quarantine.php?op=' + action + '&id=' + ids;
     location.href=url;
 }
+
+function updataAction(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.031958 seconds and 5 git commands to generate.