[rt-users] Adding an UncheckAll button to Bulk update
Myers, Adam
AMyers at abacus-us.com
Mon Nov 7 10:09:48 EST 2005
Add this to Bulk.html.
-<FORM METHOD="POST" ACTION="<%$RT::WebPath%>/Search/Bulk.html" >
+<FORM id="bulk-form" METHOD="POST"
ACTION="<%$RT::WebPath%>/Search/Bulk.html" >
<input type="hidden" name="Query" value="<%$ARGS{'Query'}%>">
<TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=0>
+<TR>
+<TD style="vertical-align: middle" COLSPAN=3><input id="check-all-bulk"
type="checkbox" name="SelectAllObjects" +onclick="checkAllBulkObjects()"
CHECKED/> Check/Uncheck All</TD>
+</TR>
<TR>
<TH><&|/l&>Update</&></TH>
Then add this javascript to your Header file.
function checkAllBulkObjects()
{
var check = document.getElementById('check-all-bulk').checked;
var elements = document.getElementById('bulk-form').elements;
var regex = /UpdateTicket/;
for( var i = 0; i < elements.length; i++ ) {
if( !regex.test(elements[i].name)) {
continue;
}
if( elements[i].type != 'checkbox' ) {
continue;
}
if( check ) {
elements[i].checked = true;
} else {
elements[i].checked = false;
}
}
}
This should work. It works great for me. I am running RT 3.4.4.
** Adam
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Andrew
Moran
Sent: Saturday, November 05, 2005 4:23 PM
To: RT User Mailinglist
Subject: [rt-users] Adding an UncheckAll button to Bulk update
I'm surprised I haven't found a Contrib for this. I want to add two
links to Bulk.html that allows one to quickly uncheckall the tickets in
question and recheck them all. Unfortunately I don't know
javascript.
If anyone has modified their Bulk.html to include the javascript code to
do this, please share! :)
--Andy
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Be sure to check out the RT Wiki at http://wiki.bestpractical.com
Buy your copy of our new book, RT Essentials, today!
Download a free sample chapter from http://rtbook.bestpractical.com
More information about the rt-users
mailing list