From 302a229d69efec0024062cd3b0fd0e1e0d382aa0 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 5 May 2017 15:00:05 +0200 Subject: [PATCH] Bug 18551 - Hide with CSS dynamic elements in member search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In member search page, the result table is in Ajax so fully managed by Javascript. There is also a yellow dialog message prepared in HTML. Thoses elements are hidden by JS code : ie $("#patron_list_dialog").hide(). The problem is that the static page is first loaded an displayed then the JS code runs an hides the elements. On a low performance computer, this action is visible and looks like there is a blinking yellow message. I propose to hide with CSS so that thoses elements are not displayed in static page and are there shown in dynamic JS code. Test plan : Check display is unchanged : - Go to home page /cgi-bin/koha/members/members-home.pl - Perform patron search from header search box - Perform patron search by clicking on a letter - Perform patron search from filters (left of results table) - Select a patron and add it to a list => you see the yellow message Yellow message does no longer appear with this patch. Signed-off-by: Marc VĂ©ron Signed-off-by: Philippe Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index faf13d1c0b..7c8c9602c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -37,7 +37,6 @@ $(document).ready(function() { } }); - $("#patron_list_dialog").hide(); $("#add_to_patron_list_submit").on('click', function(e){ if ( $('#add_to_patron_list').val() == 'new' ) { if ( $('#new_patron_list').val() ) { @@ -132,8 +131,9 @@ $(document).ready(function() { [% END %] [% IF view != "show_results" %] - $("#searchresults").hide(); search = 0; + [% ELSE %] + $("#searchresults").show(); [% END %] // Build the aLengthMenu @@ -328,7 +328,7 @@ function filterByFirstLetterSurname(letter) {
[% IF CAN_user_tools_manage_patron_lists %] -
+ [% END %] @@ -355,7 +355,7 @@ function filterByFirstLetterSurname(letter) {
[% END %] -
+