File: mastercheckbox.phtml

package info (click to toggle)
wims 2%3A4.30%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 185,332 kB
  • sloc: xml: 366,687; javascript: 120,570; java: 62,170; ansic: 61,221; sh: 7,747; perl: 3,939; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (23 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
!! put a master check box to check/uncheck all checkbox of class $wims_read_parm

<input id="$(wims_read_parm)_master" type="checkbox" onclick="allcheck('$wims_read_parm','$(wims_read_parm)_master')" />

!if $configuration_mastercheckboxread_!=yes
  <script type="text/javascript" > 
      function allcheck(classe,masterid){
         tabl_c = document.getElementsByClassName(classe);
         if (document.getElementById(masterid).checked){
             for (var i = 0; i < tabl_c.length; i++){
              tabl_c[i].checked = true;
             }
         }
         else {
            for (var i = 0; i < tabl_c.length; i++){
              tabl_c[i].checked = false;
            }
         } 
      }
  </script>
  !let configuration_mastercheckboxread_=yes
!endif