summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-11-09 19:25:52 +0100
committermkanat%bugzilla.org <>2009-11-09 19:25:52 +0100
commit877c8ef605f770b00aeda25588c963ef3d5597af (patch)
tree1ef3b5547d82b714a359d1eef35ea0cb13fc7403
parentfc0f80b2ca854bf6142ee164d34c3028f2fc470d (diff)
downloadbugzilla-877c8ef605f770b00aeda25588c963ef3d5597af.tar.gz
bugzilla-877c8ef605f770b00aeda25588c963ef3d5597af.tar.xz
Bug 450747: Minor JS cleanup for the "edit multiple bugs" page
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=mkanat, a=mkanat
-rw-r--r--template/en/default/list/edit-multiple.html.tmpl13
1 files changed, 8 insertions, 5 deletions
diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl
index fa8d3d1ae..05d534976 100644
--- a/template/en/default/list/edit-multiple.html.tmpl
+++ b/template/en/default/list/edit-multiple.html.tmpl
@@ -28,12 +28,15 @@
<input type="hidden" name="token" value="[% token FILTER html %]">
<script type="text/javascript">
- var numelements = document.forms.changeform.elements.length;
function SetCheckboxes(value) {
- var item;
- for (var i=0 ; i<numelements ; i++) {
- item = document.forms.changeform.elements[i];
- item.checked = value;
+ var elements = document.forms.changeform.getElementsByTagName('input'),
+ numelements = elements.length,
+ item, i;
+ for (i = 0; i < numelements; i++) {
+ item = elements[i];
+ if (item.type === 'checkbox' && item.name.match(/^id_/)) {
+ item.checked = value;
+ }
}
}
document.write(' <input type="button" name="uncheck_all" value="Uncheck All" onclick="SetCheckboxes(false);">');