From e5a44214eb9ceb4646f23dd6962bcdc85e58d5b8 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Sat, 6 Mar 2021 16:02:34 +0000 Subject: [PATCH] Bug 27886: Move non-rancor code into correct section The template was including code that was not compatible with Rancor, moving the end of the conditional seems to fix the error To test: 1 - Open a record in the advanced catalog editor 2 - Create or edit a 100 field with some content, I used 'bruce' 3 - Press Ctrl+shift+l to launch authority search 4 - Perform a search and select an authority 5 - Note the field copies but the pop-ups don't close 6 - Apply patch 7 - Reload the page 8 - Repeat 1-4 9 - The field copies and the windows close Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../authorities/blinddetail-biblio-search.tt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt index e86f46db77..9c2ca47bcc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt @@ -146,22 +146,22 @@ [% END %] } } - [% END %] - //Delete create authority button and status - var linkinfos = field_start.getElementsByTagName('i'); - for (index = linkinfos.length - 1; index >= 0; index--) { - linkinfos[index].parentNode.removeChild(linkinfos[index]); - } - //Change message autolinker_dialog - var subfield_dialog = $(autolinker_dialog).children('ul').children('li'); - for (index = subfield_dialog.length - 1; index >= 0; index--){ - var tag_field = field_start.id.split("_")[1]; - if (subfield_dialog[index].innerHTML.indexOf(tag_field) !== -1 ){ - subfield_dialog[index].innerHTML = subfield_dialog[index].innerHTML.replace(_("No matching authority found."), _("No matching authority found. A new authority was created or imported")); - break; + //Delete create authority button and status + var linkinfos = field_start.getElementsByTagName('i'); + for (index = linkinfos.length - 1; index >= 0; index--) { + linkinfos[index].parentNode.removeChild(linkinfos[index]); + } + //Change message autolinker_dialog + var subfield_dialog = $(autolinker_dialog).children('ul').children('li'); + for (index = subfield_dialog.length - 1; index >= 0; index--){ + var tag_field = field_start.id.split("_")[1]; + if (subfield_dialog[index].innerHTML.indexOf(tag_field) !== -1 ){ + subfield_dialog[index].innerHTML = subfield_dialog[index].innerHTML.replace(_("No matching authority found."), _("No matching authority found. A new authority was created or imported")); + break; + } } - } + [% END %] opener.close(); window.close(); return false; -- 2.39.5