From e925d082f624975b66172c0ef2834d851bb88ef5 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=UTF-8 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 --- .../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 2c4cfb5336..713e2797b1 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 @@ -70,10 +70,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 55e25f8887..c6fb5e84cd 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 @@ -71,10 +71,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 51b9dde8e6..64d82da82b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/addbybiblionumber.tt @@ -7,12 +7,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 ) %] @@ -105,15 +105,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.34.1