@@ -47,7 +47,9 @@
padding-top: .8em;
}
</style>
<script src="http://www.google.com/jsapi"></script>
<script type="text/javascript" charset="utf-8">
google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.2");
@@ -98,6 +100,7 @@
jQuery.validator.addClassRules("selectRequired", {
selectNone: true
});
jQuery.validator.addClassRules("daysRequire", {
daysRequired: true
@@ -111,13 +114,13 @@
var classNum = 0;
var sectionsOfClass = new Array(); // holds number of sections for each class
//---------------------------------------------
function getCommonInputs(cnum)
{
//--------------------------------------------------
// Returns the common inputs for each new section.
function getCommonInputs(cnum) {
var snum = sectionsOfClass[cnum];
var result = '<td>\
@@ -165,9 +168,6 @@
return result;
// Adds a new class to the input.
@@ -176,7 +176,6 @@
sectionsOfClass[classNum] = 0; // This is class 0, initialize at 0
jQuery('#jsrows').append('<tr title="' + classNum + '" class="class class' + classNum + '"><td><input type="text" class="required" name="postData[' + classNum + '][name]" /></td>' + getCommonInputs(classNum) + '<td><div class="addSection"><input type="button" value="Add section" /></div></td><td><div class="deleteClass"><input type="button" value="Delete" /></div></td></tr>');
classNum++;
};
addRow(); // Add initial row
@@ -222,21 +221,33 @@
</script>
</head>
<body>
<div id="header">
<h1><em>SlatePermutate</em> - Scheduler</h1>
<h1>
<em>
SlatePermutate
</em>
- Scheduler
</h1>
</div>
<div id="content">
<h3>Saved Schedules:</h3>
<h3>
Saved Schedules:
</h3>
<p>
<?php
if(isset($_SESSION['saved']))
foreach($_SESSION['saved'] as $key => $schedule)
echo "<a href=\"process.php?savedkey=$key\">Saved Schedule $key</a><br />";
foreach($_SESSION['saved'] as $schedule)
echo "Saved Schedule<br />";
else
echo "No saved schedules!<br />";
?>
</p>
<form method="post" action="process.php" id="scheduleForm">
@@ -259,14 +270,24 @@ else
</table>
<div class="paddingtop" id="classage"><input type="button" value="Add class" /></div>
<div class="paddingtop"><input style="float:left;" type="submit" value="Submit" /></div>
<p><br /></p>
<br />
<div class="paddingtop" id="reset"><input style="float:left;" type="button" value="Reset" /></div>
</form>
<p> <br /></p>
 
<h3>TODO:</h3>
<ul>
<li>Form validation to ensure endtime is after starttime, at least one day is checked.</li>
<li>Check the saved schedule function. After input my default schedule, the output was the same
@@ -275,9 +296,22 @@ were then 48 possible schedules. It seem
</ul>
<div id="footer">
<h5>© <?php echo Date("Y"); ?> <a href="http://protofusion.org/~nathang/">Nathan Gelderloos</a><br />
with special thanks to <a href="http://ethanzonca.com">Ethan Zonca</a></h5>
<h5>
©
<?php echo Date("Y"); ?>
<a href="http://protofusion.org/~nathang/">
Nathan Gelderloos
</a>
with special thanks to
<a href="http://ethanzonca.com">
Ethan Zonca
</h5>
</body>
</html>
\ No newline at end of file
Status change: