Lines 418-424
Link Here
|
418 |
paginate: false |
418 |
paginate: false |
419 |
})); |
419 |
})); |
420 |
|
420 |
|
421 |
if( $("#subfieldtabs").length > 0 ){ |
421 |
if ($("#subfieldtabs").length > 0) { |
422 |
[% IF ( tagsubfield && tagsubfield == "@") %] |
422 |
[% IF ( tagsubfield && tagsubfield == "@") %] |
423 |
$("#subfieldtabs a[href='#AT_panel']").tab("show"); |
423 |
$("#subfieldtabs a[href='#AT_panel']").tab("show"); |
424 |
[% ELSIF ( tagsubfield && tagsubfield != "@") %] |
424 |
[% ELSIF ( tagsubfield && tagsubfield != "@") %] |
Lines 428-447
Link Here
|
428 |
[% END %] |
428 |
[% END %] |
429 |
|
429 |
|
430 |
var subfields_list = $("#subfieldtabs > ul"); |
430 |
var subfields_list = $("#subfieldtabs > ul"); |
431 |
var sortable_subfields = new Sortable( subfields_list[0], { |
431 |
var sortable_subfields = new Sortable(subfields_list[0], { |
432 |
onEnd: function( e ){ |
432 |
onEnd: function (e) { |
433 |
var old_index = e.oldIndex; |
433 |
var old_index = e.oldIndex; |
434 |
var new_index = e.newIndex; |
434 |
var new_index = e.newIndex; |
435 |
if (old_index < new_index) new_index++; |
435 |
if (old_index < new_index) new_index++; |
436 |
var subfield_code = e.item.id.replace( /^tab_subfield_/, ''); |
436 |
var subfield_code = e.item.id.replace(/^tab_subfield_/, ""); |
437 |
var content = $( '#' + subfield_code + '_panel'); |
437 |
var content = $("#" + subfield_code + "_panel"); |
438 |
var panels = $("#subfieldtabs .tab-pane"); |
438 |
var panels = $("#subfieldtabs .tab-pane"); |
439 |
if ( new_index < $(panels).size() ){ |
439 |
if (new_index < $(panels).size()) { |
440 |
$(content).insertBefore( panels[new_index]); |
440 |
$(content).insertBefore(panels[new_index]); |
441 |
} else { |
441 |
} else { |
442 |
$(content).insertAfter( panels[new_index-1]); |
442 |
$(content).insertAfter(panels[new_index - 1]); |
443 |
} |
443 |
} |
444 |
} |
444 |
}, |
445 |
}); |
445 |
}); |
446 |
} |
446 |
} |
447 |
|
447 |
|