1 function tickAll(section){
2 $("input[name='" + section + "']").prop("checked", true);
3 $("#" + section.slice(0,-1) + "ALL").prop("checked", true);
4 $("input[name='" + section + "']").prop("disabled", true);
5 $("#" + section.slice(0,-1) + "ALL").prop("disabled", false);
8 function untickAll(section){
9 $("input[name='" + section + "']").prop("checked", false);
10 $("input[name='" + section + "']").prop("disabled", false);
13 $(document).ready(function(){
15 if ( $('input[name="modules"]:checked').length == 0 ) {
18 $("#moduleALL").change(function(){
19 if ( this.checked == true ){
25 $("input[name='modules']").change(function(){
26 if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){
31 if ( $('input[name="actions"]:checked').length == 0 ) {
34 $("#actionALL").change(function(){
35 if ( this.checked == true ){
42 $("input[name='actions']").change(function(){
43 if ( $("input[name='actions']:checked").length == $("input[name='actions']").length - 1 ){
48 if ( $('input[name="interfaces"]:checked').length == 0 ) {
49 tickAll('interfaces');
51 $("#interfaceALL").change(function(){
52 if ( this.checked == true ){
53 tickAll('interfaces');
55 untickAll('interfaces');
59 $("input[name='interfaces']").change(function(){
60 if ( $("input[name='interfaces']:checked").length == $("input[name='interfaces']").length - 1 ){
61 tickAll('interfaces');