]>
Commit | Line | Data |
---|---|---|
5c7b972e MR |
1 | /* vim: set ts=4 tw=4 sw=4 noet: */ |
2 | ||
ebed9332 | 3 | function checkAction(action) { |
5c7b972e MR |
4 | var ids = ''; |
5 | var c = document.getElementsByName('action'); | |
6 | for (var i = 0; i < c.length; i++) { | |
acaa44d2 | 7 | if (c[i].type == 'checkbox' && c[i].checked == true) { |
5c7b972e MR |
8 | if (ids == '') { |
9 | ids = c[i].value; | |
10 | } else { | |
11 | ids += ',' + c[i].value; | |
12 | } | |
13 | } | |
14 | } | |
ebed9332 | 15 | var url = 'quarantine.php?op=' + action + '&id=' + ids; |
04041417 | 16 | location.href=url; |
5c7b972e | 17 | } |
183095ba | 18 | |
38f376fa | 19 | function updateAction(chkBtn) { |
183095ba MR |
20 | var checked = chkBtn.checked; |
21 | var c = document.getElementsByName('action'); | |
22 | for (var i = 0; i < c.length; i++) { | |
23 | if (c[i].type == 'checkbox' && c[i].checked != checked) { | |
17dc0774 | 24 | c[i].checked = checked; |
183095ba MR |
25 | } |
26 | } | |
27 | } |