From e2b85aa9b96410dab6ecf5c1736e295c9cc07894 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=utf8 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 Signed-off-by: Kyle M Hall (cherry picked from commit 5cc536c68b221823f4335b5b5db1108521f88a71) Signed-off-by: Katrin Fischer --- 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 cccf0791a2..1d4acf8f7f 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() ) { @@ -131,8 +130,9 @@ $(document).ready(function() { [% END %] [% IF view != "show_results" %] - $("#searchresults").hide(); search = 0; + [% ELSE %] + $("#searchresults").show(); [% END %] // Build the aLengthMenu @@ -327,7 +327,7 @@ function filterByFirstLetterSurname(letter) {
[% IF CAN_user_tools_manage_patron_lists %] -
+ [% END %] @@ -354,7 +354,7 @@ function filterByFirstLetterSurname(letter) {
[% END %] -
+