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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-11 / +17 lines)
Lines 21-37 Link Here
21
    });
21
    });
22
    var Sticky;
22
    var Sticky;
23
    $(document).ready(function() {
23
    $(document).ready(function() {
24
        var tabs = $('#authoritytabs').tabs().bind('show.ui-tabs', function(e, ui) {
24
        var tabs = $('#authoritytabs').tabs({
25
            $("#"+ui.panel.id+" input:eq(0)").focus();
25
            activate: function(e, ui) {
26
        });
26
                $("#"+ $(ui.newPanel).attr("id") + " .input_marceditor:visible:eq(0)").focus();
27
27
            }
28
        $( "ul.sortable_field", tabs ).sortable();
28
         });
29
        $( "ul.sortable_subfield", tabs ).sortable();
29
30
        /* On page load, check for location.hash in the page URL */
31
        var hash = location.hash;
32
        var hashPieces = hash.split('?');
33
        if( hashPieces[0] !== "" ){
34
            var activeTab = $("[href='" + hashPieces[0] + "']");
35
            selectTab(activeTab);
36
            window.scrollTo( 0, 0 );
37
        }
30
38
31
        [% IF tab %]
32
            link = $("a[href='#[% tab | html %]']");
33
            selectTab( link );
34
        [% END %]
35
        $( "ul.sortable_field", tabs ).sortable();
39
        $( "ul.sortable_field", tabs ).sortable();
36
        $( "ul.sortable_subfield", tabs ).sortable();
40
        $( "ul.sortable_subfield", tabs ).sortable();
37
        Sticky = $("#toolbar");
41
        Sticky = $("#toolbar");
Lines 362-368 Link Here
362
366
363
                        [% FOREACH BIG_LOO IN BIG_LOOP %]
367
                        [% FOREACH BIG_LOO IN BIG_LOOP %]
364
                            <div id="tab[% BIG_LOO.number | html %]XX">
368
                            <div id="tab[% BIG_LOO.number | html %]XX">
365
369
                                [% IF ( BIG_LOOP.size > 1 ) %]
370
                                    <h2>Section [% BIG_LOO.number | html %]</h2>
371
                                [% END %]
366
                                [% previous = "" %]
372
                                [% previous = "" %]
367
                                [% FOREACH innerloo IN BIG_LOO.innerloop %]
373
                                [% FOREACH innerloo IN BIG_LOO.innerloop %]
368
                                    [% IF ( innerloo.tag ) %]
374
                                    [% IF ( innerloo.tag ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt (-1 / +8 lines)
Lines 134-139 Link Here
134
                $("#authoritiestabs a:first").tab("show");
134
                $("#authoritiestabs a:first").tab("show");
135
            }
135
            }
136
136
137
            var editAuth = $("#editAuth");
138
            var editAuthLink = editAuth.attr("href");
139
140
            $("a[data-toggle='tab']").on("shown.bs.tab", function (e) {
141
                var newTabId = $(this).attr("href");
142
                editAuth.attr("href", editAuthLink + newTabId );
143
            });
144
137
            [% IF ( displayhierarchy ) %]
145
            [% IF ( displayhierarchy ) %]
138
                $('#hierarchies').jstree({
146
                $('#hierarchies').jstree({
139
                    "types" : {
147
                    "types" : {
140
- 

Return to bug 30422