MantisBT: master 111d9b76

Author Committer Branch Timestamp Parent
dhx dhx master 2010-08-19 09:07 master 17a2bc4d
Affected Issues  0011826: Remove all inline JavaScript from MantisBT (use external scripts instead)
Changeset

Issue 0011826: Use jQuery to handle "select all" checkbox

The "select all" checkbox on view_all_bug_page currently uses inline
JavaScript via the onclick event to select all the checkboxes on the
page.

This patch removes the inline JavaScript and instead replaces it with
equivalent (but more portable/reusable) jQuery code.

To implement any "select all" checkbox in the future, all one has to do
is:

1) Ensure the "Select all" checkbox is within the same form as the
checkboxes to check.

2) Ensure that the "Select all" checkbox includes the class "check_all".

3) Name the target checkboxes as "{field_name}[]" e.g., name="bugs[]" or
name="users[]".

4) Name the "Select all" checkbox as "{field_name}_all" e.g.,
name="bugs_all" or name="users_all".

mod - javascript/dev/common.js Diff File
mod - view_all_inc.php Diff File