View | Details | Raw Unified | Return to bug 34571
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-2 / +6 lines)
Lines 341-346 Link Here
341
    function formatFieldName( string ){
341
    function formatFieldName( string ){
342
        return "<strong><em>" + string + "</em></strong>";
342
        return "<strong><em>" + string + "</em></strong>";
343
    }
343
    }
344
345
    $(document).ready(function(){
346
        $('body').on('click','.expandfield',ExpandField);
347
    });
344
</script>
348
</script>
345
[% Asset.css("css/addbiblio.css") | $raw %]
349
[% Asset.css("css/addbiblio.css") | $raw %]
346
350
Lines 528-534 Link Here
528
                                                <div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
532
                                                <div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
529
                                                    [% UNLESS hide_marc %]
533
                                                    [% UNLESS hide_marc %]
530
                                                        [% IF advancedMARCEditor %]
534
                                                        [% IF advancedMARCEditor %]
531
                                                            <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to expand this tag" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;">[% innerloo.tag | html %]</a>
535
                                                            <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to expand this tag" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'">[% innerloo.tag | html %]</a>
532
                                                        [% ELSE %]
536
                                                        [% ELSE %]
533
                                                            <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
537
                                                            <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
534
                                                        [% END %]
538
                                                        [% END %]
Lines 588-594 Link Here
588
                                                    [% END # /UNLESS hide_marc %]
592
                                                    [% END # /UNLESS hide_marc %]
589
593
590
                                                    [% UNLESS advancedMARCEditor %]
594
                                                    [% UNLESS advancedMARCEditor %]
591
                                                        <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Click to expand this tag">[% innerloo.tag_lib | html %]</a>
595
                                                        <a href="#" tabindex="1" class="expandfield" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" title="Click to expand this tag">[% innerloo.tag_lib | html %]</a>
592
                                                    [% END %]
596
                                                    [% END %]
593
                                                    <span class="field_controls">
597
                                                    <span class="field_controls">
594
                                                        [% IF ( innerloo.repeatable ) %]
598
                                                        [% IF ( innerloo.repeatable ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-2 / +7 lines)
Lines 780-785 function PopupMARCFieldDoc(field) { Link Here
780
    function formatFieldName( string ){
780
    function formatFieldName( string ){
781
        return "<strong><em>" + string + "</em></strong>";
781
        return "<strong><em>" + string + "</em></strong>";
782
    }
782
    }
783
784
    $(document).ready(function(){
785
        $('body').on('click','.expandfield',ExpandField);
786
    });
787
783
</script>
788
</script>
784
[% Asset.css("css/addbiblio.css") | $raw %]
789
[% Asset.css("css/addbiblio.css") | $raw %]
785
</head>
790
</head>
Lines 1037-1043 function PopupMARCFieldDoc(field) { Link Here
1037
                                        [% END %]
1042
                                        [% END %]
1038
                                            <div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
1043
                                            <div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">
1039
                                                [% IF advancedMARCEditor %]
1044
                                                [% IF advancedMARCEditor %]
1040
                                                    <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to expand this tag" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;">[% innerloo.tag | html %]</a>
1045
                                                    <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to expand this tag" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]">[% innerloo.tag | html %]</a>
1041
                                                [% ELSE %]
1046
                                                [% ELSE %]
1042
                                                    <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
1047
                                                    <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span>
1043
                                                    <a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag | html %]'); return false;">&nbsp;?</a>
1048
                                                    <a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag | html %]'); return false;">&nbsp;?</a>
Lines 1078-1084 function PopupMARCFieldDoc(field) { Link Here
1078
                                                [% END # /IF innerloo.fixedfield %] -
1083
                                                [% END # /IF innerloo.fixedfield %] -
1079
1084
1080
                                                [% UNLESS advancedMARCEditor %]
1085
                                                [% UNLESS advancedMARCEditor %]
1081
                                                    <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Click to expand this tag">[% innerloo.tag_lib | html %]</a>
1086
                                                    <a href="#" tabindex="1" class="expandfield" data-field_id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" title="Click to expand this tag">[% innerloo.tag_lib | html %]</a>
1082
                                                [% END %]
1087
                                                [% END %]
1083
1088
1084
                                                <span class="field_controls">
1089
                                                <span class="field_controls">
(-)a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js (-3 / +4 lines)
Lines 59-65 function openAuth(tagsubfieldid,authtype,source) { Link Here
59
    window.open("../authorities/auth_finder.pl?source="+source+"&authtypecode="+authtype+"&index="+tagsubfieldid+"&value_mainstr="+encodeURIComponent(mainmainstring)+"&value_main="+encodeURIComponent(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
59
    window.open("../authorities/auth_finder.pl?source="+source+"&authtypecode="+authtype+"&index="+tagsubfieldid+"&value_mainstr="+encodeURIComponent(mainmainstring)+"&value_main="+encodeURIComponent(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
60
}
60
}
61
61
62
function ExpandField(index) {
62
function ExpandField() {
63
    let index = this.dataset.field_id;
63
    var original = document.getElementById(index); //original <li>
64
    var original = document.getElementById(index); //original <li>
64
    var lis = original.getElementsByTagName('li');
65
    var lis = original.getElementsByTagName('li');
65
    for(var i=0,lislen = lis.length ; i<lislen ; i++){   // foreach li
66
    for(var i=0,lislen = lis.length ; i<lislen ; i++){   // foreach li
Lines 77-82 function ExpandField(index) { Link Here
77
            }
78
            }
78
        }
79
        }
79
    }
80
    }
81
    return false;
80
}
82
}
81
83
82
var current_select2;
84
var current_select2;
Lines 307-313 function CloneField(index, hideMarc, advancedMARCEditor) { Link Here
307
                        } else if (anchors[j].getAttribute('class') == 'buttonMinus') {
309
                        } else if (anchors[j].getAttribute('class') == 'buttonMinus') {
308
                            anchors[j].setAttribute('onclick',"UnCloneField('" + new_id + "'); return false;");
310
                            anchors[j].setAttribute('onclick',"UnCloneField('" + new_id + "'); return false;");
309
                        } else if (anchors[j].getAttribute('class') == 'expandfield') {
311
                        } else if (anchors[j].getAttribute('class') == 'expandfield') {
310
                            anchors[j].setAttribute('onclick',"ExpandField('" + new_id + "'); return false;");
312
                            anchors[j].setAttribute('data-field_id',new_id);
311
                        }
313
                        }
312
                    }
314
                    }
313
                }
315
                }
314
- 

Return to bug 34571