X-Git-Url: http://git.datanom.net/qtadmin.git/blobdiff_plain/040414177ab804fc6892a4d7f47413ef9a165c4d..55e904ab4e0994f21d26a68e70497fcacd8ec2d6:/js/checkbox.js diff --git a/js/checkbox.js b/js/checkbox.js index d2d516c..0bdce8e 100644 --- a/js/checkbox.js +++ b/js/checkbox.js @@ -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; + } + } +}