<li>
<label for="modules">Modules:</label>
<div class="log_modules">
- [% UNLESS modules %]
+ [% IF modules.size == 0 %]
<label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value="" checked="checked"> All</label>
[% ELSE %]
<label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label>
<li>
<label for="actions">Actions:</label>
<div class="log_modules">
- [% UNLESS actions %]
+ [% IF actions.length == 0 %]
<label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value="" checked="checked"> All</label>
[% ELSE %]
<label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label>
</li>
<li>
<label for="interfaces">Interface:</label>
- [% UNLESS interfaces %]
+ [% IF interfaces.size == 0 %]
<label for="interfaceALL" class="viewlog"><input type="checkbox" id="interfaceALL" name="interfaces" value="" checked="checked"> All</label>
[% ELSE %]
<label for="interfaceALL" class="viewlog"><input type="checkbox" id="interfaceALL" name="interfaces" value=""> All</label>
[% FOREACH interf IN [ 'INTRANET' 'OPAC' 'SIP' 'COMMANDLINE' ] %]
[% IF interfaces.grep(interf).size %]
- <label for="interface[% interf | html %]" class="viewlog"><input type="checkbox" id="interface[% interf | html %]" name="interfaces" value="" checked="checked"> [% PROCESS translate_log_interface log_interface=interf %]</label>
+ <label for="interface[% interf | html %]" class="viewlog"><input type="checkbox" id="interface[% interf | html %]" name="interfaces" value="[% interf | html %]" checked="checked"> [% PROCESS translate_log_interface log_interface=interf %]</label>
[% ELSE %]
- <label for="interface[% interf | html %]" class="viewlog"><input type="checkbox" id="interface[% interf | html %]" name="interfaces" value=""> [% PROCESS translate_log_interface log_interface=interf %]</label>
+ <label for="interface[% interf | html %]" class="viewlog"><input type="checkbox" id="interface[% interf | html %]" name="interfaces" value="[% interf | html %]"> [% PROCESS translate_log_interface log_interface=interf %]</label>
[% END %]
[% END %]
</li>
}
$(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 ){
}
});
- tickAll('actions');
+ if ( $('input[name="actions"]:checked').length == 0 ) {
+ tickAll('actions');
+ }
$("#actionALL").change(function(){
if ( this.checked == true ){
tickAll('actions');
}
});
- tickAll('interfaces');
+ if ( $('input[name="interfaces"]:checked').length == 0 ) {
+ tickAll('interfaces');
+ }
$("#interfaceALL").change(function(){
if ( this.checked == true ){
tickAll('interfaces');