Changeset - 40ac3e1dc483
[Not reviewed]
default
0 3 0
ethanzonca - 15 years ago 2010-09-23 22:46:30

Add Class button moved, other visual changes. The add class button needs some work.
3 files changed with 24 insertions and 5 deletions:
0 comments (0 inline, 0 general)
input.php
Show inline comments
 
@@ -10,12 +10,14 @@ include_once 'inc/class.page.php';
 
$inputPage = new page('Scheduler', $scripts);
 
$inputPage->showSavedScheds($_SESSION);
 

	
 
?>
 

	
 
<form method="post" action="process.php" id="scheduleForm">
 
<table>
 
  <tr>
 
<table id="jsrows">
 
	<tr>
 
		<td colspan="11" style="padding-bottom:2em;"><input id="scheduleName" class="defText" type="text" class="required" title="Schedule Name" name="postData[name]" />
 
			<em>(For example: Fall <?php echo Date("Y"); ?>)</em>
 
		</td>
 
	</tr>
 
@@ -34,14 +36,17 @@ include_once 'inc/class.page.php';
 
		<td class="center">Th</td>
 
		<td class="center">F</td>
 
		<td class="center"></td>
 
		<td class="center"></td>
 
	</tr>
 
</table>
 
  </tr>
 
  <tr><td> <span class="gray" style="padding: 0 3.5em 0 3.5em;" id="addclass">Add Class</span></td></tr>
 
</table>
 

	
 
<div class="paddingtop" id="classage"><input type="button" value="Add class" /></div>
 
<!-- <div class="paddingtop" id="classage"><input type="button" value="Add class" /></div> -->
 
<div class="paddingtop"><input style="float:left;" type="submit" value="Submit" /></div>
 

	
 
</form>
 

	
 
<p>&nbsp;<br /></p>
 

	
 
@@ -49,13 +54,12 @@ include_once 'inc/class.page.php';
 

	
 
<ul>
 
	<li>Add print stylesheet and button to output page</li>
 
	<li>After selecting a start time, set the end time to one hour after the start time</li>
 
        <li><strong>Append</strong> sections</li>
 
        <li>Move the add class button to somewhere nicer, maybe a gray row at the bottom. Make the submit button more obvious.</li>
 
	<li><strong>Switch from dropdown for section identifier to entry field</strong></li>
 
	<li>Form validation to ensure endtime is after starttime, at least one day is checked.</li>
 
	<li>Auto-populate form based on saved schedule?</li>
 
        <li>Grab data from school sites such as <a href="http://www.cedarville.edu/courses/schedule/2010fa_be_bebl.htm" target="_blank">this?</a></li>
 
</ul>
 

	
 
<?php
scripts/scheduleInput.js
Show inline comments
 
@@ -69,13 +69,13 @@
 
                                <select name="'+name+'"><option value="-">-</option><option value="A">A</option><option value="B">B</option>\
 
                                <option value="C">C</option><option value="D">D</option><option value="E">E</option><option value="F">F</option><option value="G">G</option>\
 
                                <option value="H">H</option><option value="I">I</option><option value="J">J</option><option value="K">K</option></select></td>\
 
                                </select></td>';
 
	}
 
	function customIds(name){
 
		return '<td class="sectionIdentifier"><input type="text" size="1" class="required" title="Schedule Name" name="' + name + '" /></td>';
 
		return '<td class="sectionIdentifier center"><input type="text" size="1" class="required" title="Schedule Name" name="' + name + '" /></td>';
 
	}
 

	
 
	//--------------------------------------------------
 
	// Returns the common inputs for each new section.
 
	//--------------------------------------------------
 
	function getCommonInputs(cnum) {
 
@@ -145,22 +145,23 @@
 
	addRow(); // Add initial row
 

	
 
	//--------------------------------------------------
 
	// Adds a new class when the add class button is 
 
	// clicked.
 
	//--------------------------------------------------
 
	jQuery('#classage').click(function() {
 
	jQuery('#addclass').click(function() {
 
		addRow();
 
	});
 

	
 
	//--------------------------------------------------
 
	// Deletes the selected class from input.
 
	//--------------------------------------------------
 
	jQuery('.deleteClass').live('click', function() {
 
		alert('Delete class and all sections of this class?');
 
		if(confirm('Delete class and all sections of this class?')) {
 
		jQuery('.class'+ jQuery(this).parent().parent().attr("title")).remove();
 
		}
 
	});
 

	
 
	//--------------------------------------------------
 
	// Deletes the selected section from the input.
 
	//--------------------------------------------------
 
	jQuery('.deleteSection').live('click', function() {
styles/general.css
Show inline comments
 
@@ -54,6 +54,20 @@
 
		padding: .5em;
 
		padding-top: .8em;
 
	}
 
.tdInput {
 
  background: #fff;
 
}
 

	
 
.addClassRow {
 
  padding: 2px;
 
  width: 30em;
 

	
 
}
 
.gray {
 
  text-align: center!important;
 
  background: #BBB!important;
 
  cursor:default;
 
}
 
.gray:hover {
 
  background: #CCC!important;
 
}
0 comments (0 inline, 0 general)