diff options
author | ivan <ivan> | 2007-01-10 23:21:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-01-10 23:21:14 +0000 |
commit | 61f3f998fe85b1d099100fbe52bc238deebf80f0 (patch) | |
tree | 60bcc3de18ab0f745052a940882462ed3c4cd2cc /httemplate/search | |
parent | 26db267c3c357a5b2846653643454c2469f2a762 (diff) |
add "select all" and "unselect" all buttons to bulk queue operations
Diffstat (limited to 'httemplate/search')
-rw-r--r-- | httemplate/search/queue.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/httemplate/search/queue.html b/httemplate/search/queue.html index 63a5d6c96..675fccd0b 100644 --- a/httemplate/search/queue.html +++ b/httemplate/search/queue.html @@ -16,7 +16,7 @@ 'title' => 'Job Queue', 'menubar' => [ 'Main menu' => $p, ], 'name' => 'jobs', - 'html_form' => qq!<FORM ACTION="$p/misc/queue.cgi" METHOD="POST">!, + 'html_form' => qq!<FORM NAME="jobForm" ACTION="$p/misc/queue.cgi" METHOD="POST">!, 'query' => { 'table' => 'queue', 'hashref' => $hashref, 'extra_sql' => 'ORDER BY jobnum', @@ -115,8 +115,18 @@ # ], 'html_foot' => sub { if ( $areboxes ) { + '<BR><INPUT TYPE="button" VALUE="select all" onClick="setAll(true)">'. + '<INPUT TYPE="button" VALUE="unselect all" onClick="setAll(false)">'. '<BR><INPUT TYPE="submit" NAME="action" VALUE="retry selected">'. - '<INPUT TYPE="submit" NAME="action" VALUE="remove selected"><BR>'; + '<INPUT TYPE="submit" NAME="action" VALUE="remove selected"><BR>'. + '<SCRIPT TYPE="text/javascript">'. + ' function setAll(setTo) { '. + ' theForm = document.jobForm;'. + ' for (i=0,n=theForm.elements.length;i<n;i++)'. + ' if (theForm.elements[i].name.indexOf("jobnum") != -1)'. + ' theForm.elements[i].checked = setTo;'. + ' }'. + '</SCRIPT>'; } else { ''; } |