forked from science-ation/science-ation
e98ec8751b
schedule shows event types in different colours add tabs to schedule editor windor for each event type forward port ENUM changes to tableeditor fix bug in emit_minute_selector
150 lines
3.9 KiB
PHP
150 lines
3.9 KiB
PHP
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#schedule_tabs").tabs({
|
|
show: function(event, ui) {
|
|
switch(ui.panel.id) {
|
|
case 'schedule_tab_general':
|
|
update_tab_general();
|
|
break;
|
|
case 'schedule_tab_scienceolympics':
|
|
update_tab_scienceolympics();
|
|
break;
|
|
}
|
|
},
|
|
selected: 0
|
|
});
|
|
|
|
event_change();
|
|
});
|
|
|
|
function update_tab_general() {
|
|
}
|
|
|
|
function update_tab_scienceolympics() {
|
|
}
|
|
|
|
function event_change() {
|
|
var ea=$("#edit_event").val().split(":");
|
|
//ea[1] is the type
|
|
switch(ea[1]) {
|
|
case "general":
|
|
$("#schedule_tabs").tabs("option","disabled",[1,2,3]);
|
|
break;
|
|
case "scienceolympic":
|
|
$("#schedule_tabs").tabs("option","disabled",[2,3]);
|
|
break;
|
|
case "sciencefairjudging":
|
|
$("#schedule_tabs").tabs("option","disabled",[1,3]);
|
|
break;
|
|
case "tour":
|
|
$("#schedule_tabs").tabs("option","disabled",[1,2]);
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
<div id="schedule_tabs">
|
|
<ul>
|
|
<li><a href="#schedule_tab_general"><span><?=i18n('General')?></span></a></li>
|
|
<li><a href="#schedule_tab_scienceolympics"><span><?=i18n('Science Olympics')?></span></a></li>
|
|
<li><a href="#schedule_tab_sciencefairjudging"><span><?=i18n('Science Fair Judging')?></span></a></li>
|
|
<li><a href="#schedule_tab_tour"><span><?=i18n('Tour')?></span></a></li>
|
|
</ul>
|
|
<div id="schedule_tab_general">
|
|
|
|
<?
|
|
|
|
|
|
|
|
echo "<form method=\"post\" id=\"edit_event_form\">";
|
|
echo "<input type=\"hidden\" name=\"id\" id=\"edit_schedule_id\">";
|
|
echo "<table style=\"width: 95%;\">";
|
|
echo "<tr><td>";
|
|
echo i18n("Event").": ";
|
|
echo "</td><td>";
|
|
echo "<select name=\"event_id\" id=\"edit_event\" onchange=\"event_change()\">";
|
|
echo "<option value=\"\">".i18n("Choose")."</option>\n";
|
|
$q=mysql_query("SELECT * FROM events WHERE conferences_id='{$conference['id']}' ORDER BY name");
|
|
while($r=mysql_fetch_object($q)) {
|
|
echo "<option value=\"$r->id:$r->eventtype\">$r->name</option>\n";
|
|
}
|
|
echo "</select>\n";
|
|
echo "</td><td>";
|
|
echo i18n("Location").": ";
|
|
echo "</td><td>";
|
|
echo "<select name=\"location_id\" id=\"edit_location\">";
|
|
echo "<option value=\"\">".i18n("Choose")."</option>\n";
|
|
$q=mysql_query("SELECT * FROM locations WHERE conferences_id='{$conference['id']}' ORDER BY name");
|
|
while($r=mysql_fetch_object($q)) {
|
|
echo "<option value=\"$r->id\">$r->name</option>\n";
|
|
}
|
|
echo "</select>\n";
|
|
echo "</td></tr>\n";
|
|
|
|
|
|
echo "<tr><td>";
|
|
echo i18n("Start at").": ";
|
|
echo "</td><td>";
|
|
emit_hour_selector('hour',"","id=\"edit_hour\"");
|
|
echo ":";
|
|
emit_minute_selector('minute',"","id=\"edit_minute\"",15);
|
|
echo "</td><td>";
|
|
echo i18n("Date").": ";
|
|
echo "</td><td>";
|
|
echo "<input id=\"edit_date\" type=\"text\" name=\"date\" class=\"date\" size=\"12\">";
|
|
echo "</td><td>";
|
|
echo "</td><td>";
|
|
echo "</td></tr>\n";
|
|
|
|
echo "<tr><td>";
|
|
echo i18n("Duration").": ";
|
|
echo "</td><td>";
|
|
echo "<input id=\"edit_duration\" type=\"text\" name=\"duration\" size=\"4\">";
|
|
echo "minutes";
|
|
echo "</td></tr>\n";
|
|
echo "</table>";
|
|
|
|
echo "</form>\n";
|
|
?>
|
|
|
|
</div>
|
|
<div id="schedule_tab_scienceolympics">
|
|
<?
|
|
echo "<table style=\"width: 95%;\">";
|
|
echo "<tr><td>";
|
|
echo i18n("Maximum Number of Teams").": ";
|
|
echo "</td><td>";
|
|
echo "<input type=\"text\" name=\"somaxteams\" id=\"edit_somaxteams\" size=\"4\">";
|
|
echo "</td></tr>";
|
|
echo "</table>";
|
|
|
|
echo "<table style=\"width: 95%;\">";
|
|
echo "<tr>";
|
|
echo "<td>";
|
|
echo i18n("Grades Recommended").": ";
|
|
echo "</td><td>";
|
|
echo i18n("Grades Required").": ";
|
|
echo "</td></tr>";
|
|
echo "<tr><td>";
|
|
//FIXME fix grades from config
|
|
for($x=7;$x<=12;$x++) {
|
|
echo "<input type=\"checkbox\" name=\"recommendedgrades[]\"> Grade $x <br />\n";
|
|
}
|
|
echo "</td><td>";
|
|
//FIXME fix grades from config
|
|
for($x=7;$x<=12;$x++) {
|
|
echo "<input type=\"checkbox\" name=\"recommendedgrades[]\"> Grade $x <br />\n";
|
|
}
|
|
echo "</td></tr>\n";
|
|
echo "</table>";
|
|
|
|
|
|
?>
|
|
</div>
|
|
<div id="schedule_tab_sciencefairjudging">
|
|
</div>
|
|
<div id="schedule_tab_tour">
|
|
</div>
|
|
|