Bug 18422 - Add Select2 to authority editor

Overview:
Repeat tag fails if authority field has select subfield (for example, UNIMARC 700$8, 800$a)
This patch adds Select2 to authority editor

Steps to Reproduce:
In authority editor repeat field that has select subfield

Actual Results:
Field does not repeat (copy is not created).
Console shows a js TypeError in cataloging.js: «$(...).select2 is not a function»

Expected Results:
Field will repeat (copy is created)

Additional Information:
Error happens in version 16.11+ after adding Select2 js functions. The easiest way to fix is to add Select2 to authority editor

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2f5a319b0a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Oleg Vasylenko 2017-04-12 10:45:48 +03:00 committed by Fridolin Somers
parent 86612541a4
commit de4fd901d3
1 changed files with 8 additions and 0 deletions

View File

@ -153,6 +153,14 @@ function confirmnotdup(redirect){
//]]>
</script>
<link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addbiblio.css" />
[% INCLUDE 'select2.inc' %]
<script>
$(document).ready(function() {
$('.subfield_line select').select2();
});
</script>
[% IF ( bidi ) %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left.css" />
[% END %]