Bug 18904: (follow-up) Set indicators and correct js path

TO test:
1 - Have an authority with some indicators
2 - Link a field in rancor to that authority
3 - See that you get some indicators (same in unimarc, diff in marc21)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2018-03-15 10:18:54 +00:00 committed by Jonathan Druart
parent 4ad0a0fd9e
commit db75d5bf03
2 changed files with 5 additions and 3 deletions

View File

@ -20,9 +20,11 @@
<script type="text/javascript">
$(document).ready(function(){
[% IF tag_number == 'rancor' %]
function RancorReplaceField( new_text ){
function RancorReplaceField( new_text, ind_1, ind_2 ){
var cur_field = opener.opener.jQuery(".CodeMirror")[0].CodeMirror.marceditor.getCurrentField();
cur_field.setText(new_text);
cur_field.setIndicator1(ind_1);
cur_field.setIndicator2(ind_2);
return true;
}
[% IF ( clear ) %]
@ -36,7 +38,7 @@
[%- END -%]
[%- END -%]‡9[% authid %]";
[% END %]
RancorReplaceField( new_line );
RancorReplaceField( new_line, "[% indicator1 %]", "[% indicator2 %]" );
[% ELSE %]
var index_start = "[% index %]";
var whichfield;

View File

@ -6,7 +6,7 @@
<link rel="stylesheet" href="[% interface %]/lib/codemirror/codemirror_[% KOHA_VERSION %].css" />
<link rel="stylesheet" href="[% interface %]/[% theme %]/css/humanmsg_[% KOHA_VERSION %].css" />
<script src="[% interface %]/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script>
<script src="[% interface %]/prog/js/cataloging.js" type="text/javascript"></script>
<script src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js" type="text/javascript"></script>
[% IF ( bidi ) %]
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
[% END %]