Bug 18904: (follow-up) Set indicators and correct js path
authorNick Clemens <nick@bywatersolutions.com>
Thu, 15 Mar 2018 10:18:54 +0000 (10:18 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Apr 2018 13:50:37 +0000 (10:50 -0300)
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>
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt

index 8635be9..f57667c 100644 (file)
     <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;
index a302c91..33d9992 100644 (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 %]