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! :slight_smile:

–Andy

Add this to Bulk.html.

-
+

+ + +

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@lists.bestpractical.com
[mailto:rt-users-bounces@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! :slight_smile:

–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

 Check/Uncheck All
<&|/l&>Update

Awesome. Works perfectly. You should add this as a Contrib on the wiki
to share the wealth. =)

–Andy

Myers, Adam wrote: