Last change
on this file since 827 was 638, checked in by Kris Deugau, 10 years ago |
/trunk
Add "Bulk Reverse Zone Operations" as an overlay on "Bulk Domain Operations"
Add "Select all" widget to bulk operations page
|
File size:
980 bytes
|
Rev | Line | |
---|
[590] | 1 | /*
|
---|
| 2 | ** Javascript helper bits
|
---|
| 3 | ** Note that these should be HELPERS, not DOESN'T WORK WITHOUT
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /* Select all domains on a page on the Bulk Domain Operations" page */
|
---|
| 7 | // a handy place to store state
|
---|
| 8 | var bulk_selstate = [];
|
---|
| 9 | function bulk_selall() {
|
---|
| 10 | var x=document.getElementById("main");
|
---|
| 11 | var y=x.getElementsByTagName("input");
|
---|
| 12 |
|
---|
| 13 | // snag the ALL EVARYTHING checkbox state
|
---|
| 14 | var newstate = document.getElementById("master").checked;
|
---|
| 15 | for (var i=0; i<y.length; i++) {
|
---|
[638] | 16 | // only monkey with the dom/rev_nnnn checkboxes
|
---|
| 17 | if (y[i].name.substring(0,4) == 'dom_' || y[i].name.substring(0,4) == 'rev_') {
|
---|
[590] | 18 | if (newstate == true) {
|
---|
| 19 | // if the master gets checkmarked, save the original state of
|
---|
[638] | 20 | // the dom/rev_nnn checkbox, and force it to "true"
|
---|
[590] | 21 | bulk_selstate[i] = y[i].checked;
|
---|
| 22 | y[i].checked = true;
|
---|
| 23 | } else {
|
---|
| 24 | // if the master gets unchecked, restore the previous state
|
---|
| 25 | y[i].checked = bulk_selstate[i];
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.