Lines 115-135
Link Here
|
115 |
[% END %] |
115 |
[% END %] |
116 |
[% END %][% END %] |
116 |
[% END %][% END %] |
117 |
|
117 |
|
118 |
<div id="subfieldtabs" class="toptabs numbered"> |
118 |
[% WRAPPER tabs id= "subfieldtabs" %] |
119 |
<ul class="nav nav-tabs" role="tablist"> |
119 |
[% WRAPPER tabs_nav %] |
120 |
[% FOREACH loo IN loop %] |
120 |
[% FOREACH loo IN loop %] |
121 |
<li role="presentation" id="tab_subfield_[%- PROCESS outputsubfield subfieldanchor = loo.tagsubfield -%]"> |
121 |
[% outputsubfield = PROCESS outputsubfield subfieldanchor = loo.tagsubfield %] |
|
|
122 |
[% WRAPPER tab_item tabname= outputsubfield id= "tab_subfield_${outputsubfield}" %] |
122 |
[% IF ( loo.new_subfield ) %] |
123 |
[% IF ( loo.new_subfield ) %] |
123 |
<a href="#sub[%- PROCESS outputsubfield subfieldanchor = loo.tagsubfield -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = loo.tagsubfield -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html %]">New</a> |
124 |
<span>New</span> |
124 |
[% ELSE %] |
125 |
[% ELSE %] |
125 |
<a href="#sub[%- PROCESS outputsubfield subfieldanchor = loo.tagsubfield -%]field" aria-controls="sub[%- PROCESS outputsubfield subfieldanchor = loo.tagsubfield -%]field" role="tab" data-toggle="tab" title="[% loo.liblibrarian | html %]">[% loo.tagsubfield | html %]</a> |
126 |
[% loo.tagsubfield | html %] |
126 |
[% END %] |
127 |
[% END # IF loo.new_subfield%] |
127 |
</li> |
128 |
[% END # WRAPPER tab_item %] |
128 |
[% END %] |
129 |
[% END # FOREACH loo %] |
129 |
</ul> |
130 |
[% END # /WRAPPER tabs_nav %] |
130 |
<div class="tab-content"> |
131 |
|
|
|
132 |
[% WRAPPER tab_panels %] |
131 |
[% FOREACH loo IN loop %] |
133 |
[% FOREACH loo IN loop %] |
132 |
<div role="tabpanel" class="tab-pane" id="sub[%- PROCESS outputsubfield subfieldanchor = loo.tagsubfield -%]field"> |
134 |
[% outputsubfield = PROCESS outputsubfield subfieldanchor = loo.tagsubfield %] |
|
|
135 |
[% WRAPPER tab_panel tabname=outputsubfield %] |
133 |
<fieldset class="rows"><ol> |
136 |
<fieldset class="rows"><ol> |
134 |
|
137 |
|
135 |
[% IF ( loo.new_subfield ) %] |
138 |
[% IF ( loo.new_subfield ) %] |
Lines 289-298
Link Here
|
289 |
</fieldset> |
292 |
</fieldset> |
290 |
</li> |
293 |
</li> |
291 |
</ol></fieldset><br class="clear" /> |
294 |
</ol></fieldset><br class="clear" /> |
292 |
</div> |
295 |
[% END # /WRAPPER tab_panel %] |
293 |
[% END %] |
296 |
[% END # /FOREACH loo %] |
294 |
</div> <!-- /.tab-content --> |
297 |
[% END # /WRAPPER tab_panels %] |
295 |
</div> |
298 |
[% END # /WRAPPER tabs %] |
296 |
</form> |
299 |
</form> |
297 |
[% END %] |
300 |
[% END %] |
298 |
|
301 |
|
Lines 415-444
Link Here
|
415 |
paginate: false |
418 |
paginate: false |
416 |
})); |
419 |
})); |
417 |
|
420 |
|
418 |
[% IF ( tagsubfield && tagsubfield == "@") %] |
421 |
if( $("#subfieldtabs").length > 0 ){ |
419 |
$("#subfieldtabs a[href='#subATfield']").tab("show"); |
422 |
[% IF ( tagsubfield && tagsubfield == "@") %] |
420 |
[% ELSIF ( tagsubfield && tagsubfield != "@") %] |
423 |
$("#subfieldtabs a[href='#AT_panel']").tab("show"); |
421 |
$("#subfieldtabs a[href='#sub[% tagsubfield | html %]field']").tab("show"); |
424 |
[% ELSIF ( tagsubfield && tagsubfield != "@") %] |
422 |
[% ELSE %] |
425 |
$("#subfieldtabs a[href='#[% tagsubfield | html %]_panel']").tab("show"); |
423 |
$("#subfieldtabs a:first").tab("show"); |
426 |
[% ELSE %] |
424 |
[% END %] |
427 |
$("#subfieldtabs a:first").tab("show"); |
|
|
428 |
[% END %] |
425 |
|
429 |
|
426 |
var subfields_list = $("#subfieldtabs > ul"); |
430 |
var subfields_list = $("#subfieldtabs > ul"); |
427 |
var sortable_subfields = new Sortable( subfields_list[0], { |
431 |
var sortable_subfields = new Sortable( subfields_list[0], { |
428 |
onEnd: function( e ){ |
432 |
onEnd: function( e ){ |
429 |
var old_index = e.oldIndex; |
433 |
var old_index = e.oldIndex; |
430 |
var new_index = e.newIndex; |
434 |
var new_index = e.newIndex; |
431 |
if (old_index < new_index) new_index++; |
435 |
if (old_index < new_index) new_index++; |
432 |
var subfield_code = e.item.id.replace( /^tab_subfield_/, ''); |
436 |
var subfield_code = e.item.id.replace( /^tab_subfield_/, ''); |
433 |
var content = $('#sub' + subfield_code + 'field'); |
437 |
var content = $( '#' + subfield_code + '_panel'); |
434 |
var panels = $("#subfieldtabs .tab-pane"); |
438 |
var panels = $("#subfieldtabs .tab-pane"); |
435 |
if ( new_index < $(panels).size() ){ |
439 |
if ( new_index < $(panels).size() ){ |
436 |
$(content).insertBefore( panels[new_index]); |
440 |
$(content).insertBefore( panels[new_index]); |
437 |
} else { |
441 |
} else { |
438 |
$(content).insertAfter( panels[new_index-1]); |
442 |
$(content).insertAfter( panels[new_index-1]); |
|
|
443 |
} |
439 |
} |
444 |
} |
440 |
} |
445 |
}); |
441 |
}); |
446 |
} |
442 |
|
447 |
|
443 |
}); |
448 |
}); |
444 |
</script> |
449 |
</script> |