Bugzilla – Attachment 101872 Details for
Bug 24982
Update the log viewer to use checkboxes instead of select lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24982: (follow-up) Retain checkbox selections after for submit
Bug-24982-follow-up-Retain-checkbox-selections-aft.patch (text/plain), 5.69 KB, created by
Kyle M Hall (khall)
on 2020-03-26 15:16:19 UTC
(
hide
)
Description:
Bug 24982: (follow-up) Retain checkbox selections after for submit
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-03-26 15:16:19 UTC
Size:
5.69 KB
patch
obsolete
>From 63afa90638f15d2a8f2f792e6f5b526a784ece68 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 26 Mar 2020 11:14:59 -0400 >Subject: [PATCH] Bug 24982: (follow-up) Retain checkbox selections after for > submit > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 10 +++++----- > koha-tmpl/intranet-tmpl/prog/js/viewlog.js | 14 ++++++++++---- > 2 files changed, 15 insertions(+), 9 deletions(-) > >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 1388368a57..5533f5aa8e 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 { > <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> >@@ -138,7 +138,7 @@ fieldset.rows label.viewlog { > <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> >@@ -168,7 +168,7 @@ fieldset.rows label.viewlog { > </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> >@@ -176,9 +176,9 @@ fieldset.rows label.viewlog { > > [% 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> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >index d41bb5d471..ccec003ade 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'); >-- >2.21.1 (Apple Git-122.3)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24982
:
101781
|
101782
|
101799
|
101824
|
101845
|
101860
|
101861
|
101862
|
101869
|
101870
|
101871
| 101872