|
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 368-374
Link Here
|
| 368 |
|
372 |
|
| 369 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
373 |
[% FOREACH BIG_LOO IN BIG_LOOP %] |
| 370 |
<div id="tab[% BIG_LOO.number | html %]XX"> |
374 |
<div id="tab[% BIG_LOO.number | html %]XX"> |
| 371 |
|
375 |
[% IF ( BIG_LOOP.size > 1 ) %] |
|
|
376 |
<h2>Section [% BIG_LOO.number | html %]</h2> |
| 377 |
[% END %] |
| 372 |
[% previous = "" %] |
378 |
[% previous = "" %] |
| 373 |
[% FOREACH innerloo IN BIG_LOO.innerloop %] |
379 |
[% FOREACH innerloo IN BIG_LOO.innerloop %] |
| 374 |
[% IF ( innerloo.tag ) %] |
380 |
[% IF ( innerloo.tag ) %] |