Browse Source

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 <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.05.x
Nick Clemens 9 months ago
committed by Jonathan Druart
parent
commit
e5a44214eb
  1. 28
      koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt

28
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;

Loading…
Cancel
Save