Lines 33-38
Link Here
|
33 |
if( hashPieces[0] !== "" ){ |
33 |
if( hashPieces[0] !== "" ){ |
34 |
selectTab( hashPieces[0] ); |
34 |
selectTab( hashPieces[0] ); |
35 |
window.scrollTo( 0, 0 ); |
35 |
window.scrollTo( 0, 0 ); |
|
|
36 |
} else { |
37 |
selectTab( "#tab0XX_panel" ); |
36 |
} |
38 |
} |
37 |
|
39 |
|
38 |
$( "ul.sortable_field", "#authoritytabs" ).sortable(); |
40 |
$( "ul.sortable_field", "#authoritytabs" ).sortable(); |
Lines 57-63
Link Here
|
57 |
return false; |
59 |
return false; |
58 |
}); |
60 |
}); |
59 |
|
61 |
|
60 |
$(".toolbar-tabs a").on("click",function(e){ |
62 |
$(".toolbar-tabs-container .nav-tabs a").on("click",function(e){ |
61 |
e.preventDefault(); |
63 |
e.preventDefault(); |
62 |
selectTab( this.hash ); |
64 |
selectTab( this.hash ); |
63 |
}); |
65 |
}); |
Lines 75-81
Link Here
|
75 |
e.preventDefault(); |
77 |
e.preventDefault(); |
76 |
var tab = $(this).data("tab"); |
78 |
var tab = $(this).data("tab"); |
77 |
var field = $(this).data("field"); |
79 |
var field = $(this).data("field"); |
78 |
var tablink = $("a[data-tabid='" + tab + "']" ); |
80 |
var tablink = $("a[data-tabname='tab" + tab + "XX']" ).get(0).hash; |
79 |
selectTab( tablink ); |
81 |
selectTab( tablink ); |
80 |
window.scrollTo( 0, getScrollto( field, "toolbar" ) ); |
82 |
window.scrollTo( 0, getScrollto( field, "toolbar" ) ); |
81 |
}); |
83 |
}); |
Lines 93-101
Link Here
|
93 |
|
95 |
|
94 |
function selectTab( tablink ){ |
96 |
function selectTab( tablink ){ |
95 |
let a = $("a[href='" + tablink + "']"); |
97 |
let a = $("a[href='" + tablink + "']"); |
96 |
$(".toolbar-tabs li").removeClass("selected"); |
98 |
$(".toolbar-tabs-container .nav-tabs li").removeClass("selected"); |
97 |
a.tab("show").parent().addClass("selected"); |
99 |
a.tab("show").parent().addClass("selected"); |
98 |
var tabid = a.data("tabid"); |
100 |
/* Get number from string like "tab9XX" */ |
|
|
101 |
var tabid = a.data("tabname").substring(3, 4); |
99 |
$(".tag_anchors").removeClass("tab_selected").hide(); |
102 |
$(".tag_anchors").removeClass("tab_selected").hide(); |
100 |
$(".tag_anchors_" + tabid ).addClass("tab_selected").show(); |
103 |
$(".tag_anchors_" + tabid ).addClass("tab_selected").show(); |
101 |
} |
104 |
} |
Lines 363-379
Link Here
|
363 |
</div> |
366 |
</div> |
364 |
<div class="toolbar-tabs-container"> |
367 |
<div class="toolbar-tabs-container"> |
365 |
[% IF ( BIG_LOOP && BIG_LOOP.size > 1 ) %] |
368 |
[% IF ( BIG_LOOP && BIG_LOOP.size > 1 ) %] |
366 |
<ul class="toolbar-tabs" role="tablist"> |
369 |
[% WRAPPER tabs_nav %] |
367 |
[%- FOREACH BIG_LOO IN BIG_LOOP -%] |
370 |
[%- FOREACH BIG_LOO IN BIG_LOOP -%] |
368 |
[% IF loop.first %] |
371 |
[% IF loop.first %] |
369 |
<li role="presentation" class="active selected"> |
372 |
[% SET bt_active = 1 %] |
370 |
[% ELSE %] |
373 |
[% ELSE %] |
371 |
<li role="presentation"> |
374 |
[% SET bt_active = 0 %] |
|
|
375 |
[% END %] |
376 |
[% WRAPPER tab_item tabname= "tab${BIG_LOO.number}XX" bt_active= bt_active %] |
377 |
<span>[% BIG_LOO.number | html %]</span> |
372 |
[% END %] |
378 |
[% END %] |
373 |
<a data-tabid="[% BIG_LOO.number | html %]" href="#tab[% BIG_LOO.number | html %]XX" aria-controls="#tab[% BIG_LOO.number | html %]XX" role="tab" data-toggle="tab">[% BIG_LOO.number | html %]</a> |
|
|
374 |
</li> |
375 |
[%- END -%] |
379 |
[%- END -%] |
376 |
</ul> |
380 |
[% END # /WRAPPER tabs_nav %] |
377 |
[% END %] |
381 |
[% END %] |
378 |
<ul class="tag_anchors_list"> |
382 |
<ul class="tag_anchors_list"> |
379 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
383 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
Lines 396-409
Link Here
|
396 |
This authority is not used in any records. |
400 |
This authority is not used in any records. |
397 |
[% END %] |
401 |
[% END %] |
398 |
</div> |
402 |
</div> |
399 |
<div id="authoritytabs" class="toptabs numbered"> |
403 |
|
400 |
<div class="tab-content"> |
404 |
[% WRAPPER tabs id= "authoritytabs" %] |
|
|
405 |
[% WRAPPER tab_panels %] |
401 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
406 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
402 |
[% IF loop.first %] |
407 |
[% IF loop.first %] |
403 |
<div id="tab[% BIG_LOO.number | html %]XX" role="tabpanel" class="tab-pane active"> |
408 |
[% SET bt_active = 1 %] |
404 |
[% ELSE %] |
409 |
[% ELSE %] |
405 |
<div id="tab[% BIG_LOO.number | html %]XX" role="tabpanel" class="tab-pane"> |
410 |
[% SET bt_active = 0 %] |
406 |
[% END %] |
411 |
[% END %] |
|
|
412 |
[% WRAPPER tab_panel tabname="tab${BIG_LOO.number}XX" bt_active= bt_active %] |
407 |
[% IF ( BIG_LOOP.size > 1 ) %] |
413 |
[% IF ( BIG_LOOP.size > 1 ) %] |
408 |
<h2>Section [% BIG_LOO.number | html %]</h2> |
414 |
<h2>Section [% BIG_LOO.number | html %]</h2> |
409 |
[% END %] |
415 |
[% END %] |
Lines 608-617
Link Here
|
608 |
[% END # /IF ( innerloo.tag ) %] |
614 |
[% END # /IF ( innerloo.tag ) %] |
609 |
[% END # /FOREACH innerloo %] |
615 |
[% END # /FOREACH innerloo %] |
610 |
</ul> <!-- /.sortable_field --> |
616 |
</ul> <!-- /.sortable_field --> |
611 |
</div> <!-- /#tab[% BIG_LOO.number | html %]XX --> |
617 |
[% END # /tab_panel#tabXXX %] |
612 |
[% END #/FOREACH BIG_LOO %] |
618 |
[% END #/FOREACH BIG_LOO %] |
613 |
</div> <!-- /.tab-content --> |
619 |
[% END # /WRAPPER tab_panels %] |
614 |
</div> <!-- /#authoritytabs --> |
620 |
[% END # /WRAPPER tabs %] |
615 |
|
621 |
|
616 |
<div name="hidden" id="hidden" class="tab"> |
622 |
<div name="hidden" id="hidden" class="tab"> |
617 |
[% FOREACH hidden_loo IN hidden_loop %] |
623 |
[% FOREACH hidden_loo IN hidden_loop %] |
618 |
- |
|
|