forked from science-ation/science-ation
48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#event_tabs").tabs({
|
|
show: function(event, ui) {
|
|
switch(ui.panel.id) {
|
|
case 'event_tab_summary':
|
|
update_tab_summary();
|
|
break;
|
|
case 'event_tab_register':
|
|
update_tab_register();
|
|
break;
|
|
}
|
|
},
|
|
selected: 0
|
|
});
|
|
});
|
|
|
|
function update_tab_summary() {
|
|
$("#event_tab_summary").load("schoolschedule_event_tab.php?action=load&tab=summary&id="+scheduleId,null,function() { });
|
|
}
|
|
|
|
function update_tab_register() {
|
|
if(scheduleId) {
|
|
$("#event_tab_register").load("schoolschedule_event_tab.php?action=load&tab=register&id="+scheduleId);
|
|
}
|
|
}
|
|
|
|
function registerSchedule(teamid,scheduleid,action) {
|
|
$("#debug").load("schoolschedule_event_tab.php?action=register",{teamid:teamid, scheduleid:scheduleid, regaction:action}, function() {
|
|
update_tab_register();
|
|
});
|
|
return false;
|
|
}
|
|
|
|
</script>
|
|
|
|
<div id="event_tabs">
|
|
<ul>
|
|
<li><a href="#event_tab_summary"><span><?=i18n('Event Summary')?></span></a></li>
|
|
<li><a href="#event_tab_register"><span><?=i18n('Register')?></span></a></li>
|
|
</ul>
|
|
<div id="event_tab_summary">
|
|
</div>
|
|
<div id="event_tab_register">
|
|
</div>
|
|
</div>
|
|
|