From 6cb78c4d613c38b95036319d33143a48e9a84dd4 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 17 Aug 2023 10:52:12 +0000 Subject: [PATCH] Bug 34562: Update more pop-up windows with consistent footer markup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch updates a few more pop-up window templates to standardize the markup of footer controls. The patch also updates the way catalog.js triggers the "Add to list" pop-up so that it uses the same window-opening JS function that similar pages do, since the default gives us consistent popup features. To test, apply the patch and perform a catalog search in the staff interface which will return multiple results. - Check the box next to one or more results. - Click the "Add to list" button. - Test the various options here: Add to an existing list, a new list, or choose "More lists." - In each case the pop-up window which appears should have a consistent fixed footer with "Save" and "Cancel" buttons. - Confirm that these controls can be navigated to using the tab key. - Confirm that each one works correctly. - Go to Administration -> Z39.50/SRU servers -> New SRU server. - Click the "Modify" button by the "SRU Search fields mapping" field. - Inspect and test the resulting pop-up window. - Switch the "Record type" dropdown to "Authority," click the "Modify" button again, and test this version of the pop-up window too. Signed-off-by: Émily-Rose Francoeur Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/admin/sru_modmapping.tt | 12 ++++--- .../en/modules/admin/sru_modmapping_auth.tt | 12 ++++--- .../virtualshelves/addbybiblionumber.tt | 31 ++++++++++--------- koha-tmpl/intranet-tmpl/prog/js/catalog.js | 3 +- 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt index e06d1c2be6..b76619cb92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping.tt @@ -72,10 +72,14 @@ -
- - Cancel -
+ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt index 7c12e278d0..2c3757a8c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/sru_modmapping_auth.tt @@ -73,10 +73,14 @@ -
- - Cancel -
+ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt index 76631902ba..ca1da22b03 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt @@ -13,12 +13,12 @@
[% UNLESS (authorized) %] -

Error adding to list

-

- [% IF (errcode==1) %]Could not create a new list. Please check the name.
[% END %] - [% IF (errcode==2) %]Sorry, you do not have permission to add items to this list.
[% END %] - Close this window. -

+
+

Error adding to list

+ [% IF (errcode==1) %]

Could not create a new list. Please check the name.

[% END %] + [% IF (errcode==2) %]

Sorry, you do not have permission to add items to this list.

[% END %] + +
[% ELSE %] [% IF ( multiple ) %] @@ -111,15 +111,16 @@ [% END %] - - -
- - Cancel -
- - - + + + [% END %] [% SET popup_window = 1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js index 072680afce..09eb2fe550 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js +++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js @@ -19,7 +19,8 @@ function addToCart(){ addRecord( biblionumber ); } -function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=' + biblionumber,'Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes'); +function addToShelf() { + openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=' + biblionumber,'Add_to_virtualshelf'); } function printBiblio() {window.print(); } -- 2.39.5