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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt (-3 / +3 lines)
Lines 103-109 Link Here
103
                                    [Overridden]
103
                                    [Overridden]
104
                                </span>
104
                                </span>
105
                            [% END %]
105
                            [% END %]
106
						</label>
106
                        </label>
107
                        [% UNLESS ( loop.last ) %]<br />[% END %]
107
                        [% UNLESS ( loop.last ) %]<br />[% END %]
108
                        [% END %]
108
                        [% END %]
109
                    </code>
109
                    </code>
Lines 154-162 Link Here
154
                        [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
154
                        [% IF ( CHUNK.syntax == "text/html" && Koha.Preference('UseWYSIWYGinSystemPreferences') ) %]
155
                            <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] mce" rows="20" cols="60">[% CHUNK.value | html %]</textarea>
155
                            <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] mce" rows="20" cols="60">[% CHUNK.value | html %]</textarea>
156
                        [% ELSE %]
156
                        [% ELSE %]
157
                            <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Click to edit</a>
157
                            <a class="expand-textarea" id="expand_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" href="#">Edit</a>
158
                            <textarea style="display:none" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] codemirror" rows="10" cols="40">[% CHUNK.value | html %]</textarea>
158
                            <textarea style="display:none" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] codemirror" rows="10" cols="40">[% CHUNK.value | html %]</textarea>
159
                            <a class="collapse-textarea" id="collapse_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" style="display:none" href="#">Click to collapse</br></a>
159
                            <a class="collapse-textarea" id="collapse_[% CHUNK.name | html %]" data-target="[% CHUNK.name | html %]" data-syntax="[% CHUNK.syntax | html %]" style="display:none" href="#">Collapse</br></a>
160
                        [% END %]
160
                        [% END %]
161
                    [% ELSIF ( CHUNK.type_languages ) %]
161
                    [% ELSIF ( CHUNK.type_languages ) %]
162
                        <ul class="sortable">
162
                        <ul class="sortable">
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js (-7 / +6 lines)
Lines 211-227 $( document ).ready( function () { Link Here
211
211
212
    addCollapseHandler();
212
    addCollapseHandler();
213
213
214
    $("h3").attr("class", "expanded").attr("title", __("Click to collapse this section"));
214
    $("h3").attr("class", "expanded").attr("title", __("Collapse this section"));
215
    var collapsible = $(".collapsed,.expanded");
215
    var collapsible = $(".collapsed,.expanded");
216
216
217
    $(collapsible).on("click",function(){
217
    $(collapsible).on("click",function(){
218
        var h3Id = $(this).attr("id");
218
        var h3Id = $(this).attr("id");
219
        var panel = $("#collapse_" + h3Id);
219
        var panel = $("#collapse_" + h3Id);
220
        if(panel.is(":visible")){
220
        if(panel.is(":visible")){
221
            $(this).addClass("collapsed").removeClass("expanded").attr("title", __("Click to expand this section") );
221
            $(this).addClass("collapsed").removeClass("expanded").attr("title", __("Expand this section") );
222
            panel.hide();
222
            panel.hide();
223
        } else {
223
        } else {
224
            $(this).addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") );
224
            $(this).addClass("expanded").removeClass("collapsed").attr("title", __("Collapse this section") );
225
            panel.show();
225
            panel.show();
226
        }
226
        }
227
    });
227
    });
Lines 233-239 $( document ).ready( function () { Link Here
233
        href = href.replace("#","");
233
        href = href.replace("#","");
234
        var panel = $("#collapse_" + href );
234
        var panel = $("#collapse_" + href );
235
        if( panel.is(":hidden") ){
235
        if( panel.is(":hidden") ){
236
            $("#" + href).addClass("expanded").removeClass("collapsed").attr("title", __("Click to collapse this section") );
236
            $("#" + href).addClass("expanded").removeClass("collapsed").attr("title", __("Collapse this section") );
237
            panel.show();
237
            panel.show();
238
        }
238
        }
239
    });
239
    });
Lines 406-413 $( document ).ready( function () { Link Here
406
               '    <div class="consentRow codeRow">' +
406
               '    <div class="consentRow codeRow">' +
407
               '        <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' +
407
               '        <textarea style="display:none;" id="pref_' + id + '" class="preference preference-code codemirror" rows="10" cols="40">' + code + '</textarea>' +
408
               '        <div>' +
408
               '        <div>' +
409
               '            <a id="expand_' + id + '" class="expand-textarea" data-target="' + id + '" data-syntax="javascript" href="#">' + __('Click to expand') + '</a>' +
409
               '            <a id="expand_' + id + '" class="expand-textarea" data-target="' + id + '" data-syntax="javascript" href="#">' + __('Expand') + '</a>' +
410
               '            <a id="collapse_' + id + '" class="collapse-textarea" data-target="' + id + '" data-syntax="javascript" href="#" style="display:none">' + __('Click to collapse') + '</a>' +
410
               '            <a id="collapse_' + id + '" class="collapse-textarea" data-target="' + id + '" data-syntax="javascript" href="#" style="display:none">' + __('Collapse') + '</a>' +
411
               '        </div >' +
411
               '        </div >' +
412
               '    </div>' +
412
               '    </div>' +
413
               '    <a class="consentDelete" data-target="' + id + '" href="#">' + __('Delete') + '</a>' +
413
               '    <a class="consentDelete" data-target="' + id + '" href="#">' + __('Delete') + '</a>' +
414
- 

Return to bug 35528