From: Kyle M Hall Date: Thu, 26 Mar 2020 15:14:59 +0000 (-0400) Subject: Bug 24982: (follow-up) Retain checkbox selections after for submit X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=a44ce976f61299f893b415dc27a1864e1a028445 Bug 24982: (follow-up) Retain checkbox selections after for submit Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize --- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index 1388368..5533f5a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -118,7 +118,7 @@ fieldset.rows label.viewlog {
  • - [% UNLESS modules %] + [% IF modules.size == 0 %] [% ELSE %] @@ -138,7 +138,7 @@ fieldset.rows label.viewlog {
  • - [% UNLESS actions %] + [% IF actions.length == 0 %] [% ELSE %] @@ -168,7 +168,7 @@ fieldset.rows label.viewlog {
  • - [% UNLESS interfaces %] + [% IF interfaces.size == 0 %] [% ELSE %] @@ -176,9 +176,9 @@ fieldset.rows label.viewlog { [% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %] [% IF interfaces.grep(interf).size %] - + [% ELSE %] - + [% END %] [% END %]
  • diff --git a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js index d41bb5d..ccec003 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js @@ -11,14 +11,16 @@ function untickAll(section){ } $(document).ready(function(){ - tickAll('modules'); + + if ( $('input[name="modules"]:checked').length == 0 ) { + tickAll('modules'); + } $("#moduleALL").change(function(){ if ( this.checked == true ){ tickAll('modules'); } else { untickAll('modules'); } - }); $("input[name='modules']").change(function(){ if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){ @@ -26,7 +28,9 @@ $(document).ready(function(){ } }); - tickAll('actions'); + if ( $('input[name="actions"]:checked').length == 0 ) { + tickAll('actions'); + } $("#actionALL").change(function(){ if ( this.checked == true ){ tickAll('actions'); @@ -41,7 +45,9 @@ $(document).ready(function(){ } }); - tickAll('interfaces'); + if ( $('input[name="interfaces"]:checked').length == 0 ) { + tickAll('interfaces'); + } $("#interfaceALL").change(function(){ if ( this.checked == true ){ tickAll('interfaces');