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

(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js (-7 / +7 lines)
Lines 95-110 $( document ).ready( function () { Link Here
95
    $("h3").attr("class","expanded").attr("title",MSG_CLICK_TO_EXPAND);
95
    $("h3").attr("class","expanded").attr("title",MSG_CLICK_TO_EXPAND);
96
    var collapsible = $(".collapsed,.expanded");
96
    var collapsible = $(".collapsed,.expanded");
97
97
98
    $(collapsible).toggle(
98
    $(collapsible).on("click",function(){
99
        function () {
99
        var panel = $(this).next("div");
100
        if(panel.is(":visible")){
100
            $(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND);
101
            $(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND);
101
            $(this).next("div").hide();
102
            panel.hide();
102
        },
103
        } else {
103
        function () {
104
            $(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE);
104
            $(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE);
105
            $(this).next("div").show();
105
            panel.show();
106
        }
106
        }
107
    );
107
    });
108
108
109
    if ( to_highlight ) {
109
    if ( to_highlight ) {
110
        var words = to_highlight.split( ' ' );
110
        var words = to_highlight.split( ' ' );
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-MARCdetail.tt (-15 / +18 lines)
Lines 182-204 $(document).ready(function(){ Link Here
182
    });
182
    });
183
183
184
    var loaded = 0;
184
    var loaded = 0;
185
    $("#switchview").toggle(
185
    var toggle = 0;
186
      function () {
186
    $("#switchview").on("click",function(e){
187
        $(this).text(_("view labeled"));
187
        e.preventDefault();
188
        $("#labeledmarc").hide();
188
        if( toggle == 0){
189
        if(!loaded){
189
            $(this).text(_("view labeled"));
190
            $("#plainmarc").show().html("<div style=\"margin:1em;padding:1em;border:1px solid #EEE;font-size:150%;\"><img src=\"[% interface %]/[% theme %]/images/loading.gif\" /> "+_("Loading")+"...</div>").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html");
190
            $("#labeledmarc").hide();
191
            loaded = 1;
191
            if(!loaded){
192
                $("#plainmarc").show().html("<div style=\"margin:1em;padding:1em;border:1px solid #EEE;font-size:150%;\"><img src=\"[% interface %]/[% theme %]/images/loading.gif\" /> "+_("Loading")+"...</div>").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html");
193
                loaded = 1;
194
            } else {
195
                $("#plainmarc").show();
196
            }
197
            toggle = 1;
192
        } else {
198
        } else {
193
            $("#plainmarc").show();
199
            $(this).text(_("view plain"));
200
            $("#labeledmarc").show();
201
            $("#plainmarc").hide();
202
            toggle = 0;
194
        }
203
        }
195
      },
204
    });
196
      function () {
197
        $(this).text(_("view plain"));
198
        $("#labeledmarc").show();
199
        $("#plainmarc").hide();
200
      }
201
    );
202
});
205
});
203
[% END %]
206
[% END %]
204
//]]>
207
//]]>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tt (-16 / +18 lines)
Lines 33-55 $(document).ready(function(){ Link Here
33
    });
33
    });
34
34
35
    var loaded = 0;
35
    var loaded = 0;
36
    $("#switchview").toggle(
36
    var toggle = 0;
37
      function () {
37
    $("#switchview").on("click",function(e){
38
        $(this).text(_("view labeled"));
38
        e.preventDefault();
39
        $("#labeledmarc").hide();
39
        if( toggle == 0){
40
        if(!loaded){
40
            $(this).text(_("view labeled"));
41
            $("#plainmarc").show().html("<div style=\"margin:1em;padding:1em;border:1px solid #EEE;font-size:150%;\"><img src=\"[% interface %]/[% theme %]/images/loading.gif\" /> "+_("Loading")+"...</div>").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html");
41
            $("#labeledmarc").hide();
42
            loaded = 1;
42
            if(!loaded){
43
                $("#plainmarc").show().html("<div style=\"margin:1em;padding:1em;border:1px solid #EEE;font-size:150%;\"><img src=\"[% interface %]/[% theme %]/images/loading.gif\" /> "+_("Loading")+"...</div>").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html");
44
                loaded = 1;
45
            } else {
46
                $("#plainmarc").show();
47
            }
48
            toggle = 1;
43
        } else {
49
        } else {
44
            $("#plainmarc").show();
50
            $(this).text(_("view plain"));
51
            $("#labeledmarc").show();
52
            $("#plainmarc").hide();
53
            toggle = 0;
45
        }
54
        }
46
      },
55
    });
47
      function () {
48
        $(this).text(_("view plain"));
49
        $("#labeledmarc").show();
50
        $("#plainmarc").hide();
51
      }
52
    );
53
});
56
});
54
[% END %]
57
[% END %]
55
//]]>
58
//]]>
56
- 

Return to bug 11878