From 2c1bc17f6c07654c4dc5e8a40ae801c19fe79bcb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 12 Jun 2020 19:46:00 +0000 Subject: [PATCH] Bug 25702: Actions button on Search results from Z39.50 is displayed incorrectly This patch modifies, again, the way the actions popup is implemented in Z39.50 search results, whether it be in cataloging, authorities, or acquisitions. The solution for Bug 25282 changed some markup which was being referred to in JavaScript. This patch makes the markup more consistent and unifies handling of the menu in one JavaScript file. The solution changes the way a menu is generated when the user clicks within the row of Z39.50 search results (not on the "Actions" button). The script now creates a clone of the actions menu in that row and appends it to the the user clicked on. To test, apply the patch and clear your browser cache if necessary. Test these three areas in the same way: 1. Cataloging -> New from Z39.50 -> Search 2. Authorities -> New from Z39.50 -> Search 3. Acquisitions -> Vendor -> Add to Basket -> From an external source -> Search. In each case, test the functionality of the "Actions" menu button in the last column ("Preview" in Acquisitions search results). The menu should be positioned correctly and menu choice works correctly Click anywhere else in the search results table. The same actions menu should be triggered in that table cell. Confirm that these menu items work correctly according to the row which was clicked. Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit 84230fcd798805c38c9ff16312121011cd0dc782) --- .../prog/en/modules/acqui/z3950_search.tt | 20 +------ .../modules/cataloguing/z3950_auth_search.tt | 42 +------------- .../en/modules/cataloguing/z3950_search.tt | 41 +------------ .../intranet-tmpl/prog/js/z3950_search.js | 58 ++++++++++++++++--- 4 files changed, 53 insertions(+), 108 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt index 2a44479ff7..f3aab65199 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt @@ -135,7 +135,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% END %] - +
Preview @@ -227,6 +227,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : [% Asset.js("js/acquisitions-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] + [% Asset.js("js/z3950_search.js") | $raw %] [% INCLUDE 'z3950_search.inc' %] - [% Asset.js("js/z3950_search.js") | $raw %] [% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt index 79df829275..b66e9d6d99 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt @@ -170,20 +170,9 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% INCLUDE 'datatables.inc' %] + [% Asset.js("js/z3950_search.js") | $raw %] [% INCLUDE 'z3950_search.inc' %] - [% Asset.js("js/z3950_search.js") | $raw %] [% END %] [% INCLUDE 'intranet-bottom.inc' popup_window=1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt index e1b6082f04..d9881a57f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt @@ -154,7 +154,7 @@ [% END %] - +
Actions @@ -242,18 +242,6 @@ [% INCLUDE 'columns_settings.inc' %]