Changeset - 56b03ab8efe9
[Not reviewed]
Merge default
0 4 0
Nathan Brink (binki) - 15 years ago 2010-09-25 01:05:19
ohnobinki@ohnopublishing.net
merge
4 files changed with 36 insertions and 15 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -98,7 +98,7 @@ class page {
 
  public function foot(){
 
    echo '</div>';
 
    $this->pageGenTime = round(microtime(), 3);
 
    echo '<div id="footer"><h5>&copy; '. 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></div>';
 
    echo '<div id="footer"><h5>&copy; '. date('Y').' <a href="http://protofusion.org/~nathang/">Nathan Gelderloos</a> <br /> <a href="http://ethanzonca.com">Ethan Zonca</a></h5></div>';
 
    echo $this->trackingcode;
 
    echo '</body></html>';
 
  }
input.php
Show inline comments
 
@@ -42,14 +42,14 @@ var sectionsOfClass = Array();
 
$inputPage->head();
 
$inputPage->showSavedScheds($_SESSION);
 
?>
 

	
 
<p>Welcome to SlatePermutate! To get started, enter in some of your classes, and add available sections for each class.</p>
 
<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]"
 
	<td colspan="11">
 
	  <input id="scheduleName" style="margin-bottom: 2em;" class="defText required" type="text" class="required" size="25" title="Schedule Name (e.g., Spring 2011)" name="postData[name]"
 
		 <?php if ($sch) echo 'value="' . str_replace('"', '&quot;', $sch->getName()) . '"'; /*"*/ ?>
 
		 />
 
	  <em>(For example: Fall <?php echo Date("Y"); ?>)</em>
 
@@ -80,16 +80,17 @@ var sectionsOfClass = Array();
 
	<?php if ($sch) echo $sch->input_form_render(); ?>
 
    </table>
 
  </tr>
 
  <tr><td> <span class="gray" style="padding: 0 3.5em 0 3.5em;" id="addclass">Add Class - This row should be just as wide as the one above someday</span></td></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"><input style="float:left;" type="submit" value="Find me a schedule!" /></div>
 
<div class="paddingtop"><input style="float:left;" type="submit" value="Find a schedule" /></div>
 

	
 
</form>
 

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

	
 
<p><span id="showadvanced"><a href="#">Show Advanced Options</a></span></p>
 
<span class="advanced">
 
<h3>TODO:</h3>
 

	
 
<ul>
scripts/scheduleInput.js
Show inline comments
 
@@ -14,6 +14,21 @@
 
		}, 
 
		"<p class=\"error\">Please select a time</p>" 
 
	); 
 
	jQuery.validator.addMethod( 
 
		"daysRequired", 
 
		function(value, element) { 
 
			var checkedCount = 0;
 
			jQuery(element).parent().children('.daysRequired:checked').each( function() {
 
				checkedCount++;
 
			});
 
			if (checkedCount == 0) 
 
			{ 
 
				return false; 
 
			} 
 
			else return true; 
 
		}, 
 
		"<p class=\"error\">Pick a day!</p>" 
 
	); 
 

	
 
/* Doesn't work right now:  */ /*
 
	jQuery.validator.addMethod( 
 
@@ -41,7 +56,7 @@
 
		selectNone: true
 
	});
 
	
 
	jQuery.validator.addClassRules("daysRequire", {
 
	jQuery.validator.addClassRules("daysRequired", {
 
		daysRequired: true
 
	});
 

	
 
@@ -72,7 +87,7 @@
 
                                </select></td>';
 
	}
 
	function customIds(name){
 
		return '<td class="sectionIdentifier center"><input type="text" size="1" class="required" title="Section Name" name="' + name + '" /></td>';
 
		return '<td class="sectionIdentifier center"><input type="text" size="1" class="required" name="' + name + '" /></td>';
 
	}
 

	
 
	//--------------------------------------------------
 
@@ -124,11 +139,11 @@
 
				<option value="1920">7:20 pm</option><option value="1950">7:50 pm</option>\
 
				<option value="2020">8:20 pm</option><option value="2050">8:50 pm</option>\
 
				<option value="2120">9:20 pm</option></select></td>\
 
			<td><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][0]" value="1" /></td>\
 
			<td><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][1]" value="1" /></td>\
 
			<td><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][2]" value="1" /></td>\
 
			<td><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][3]" value="1" /></td>\
 
			<td><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][4]" value="1" /></td>';
 
			<td class="cbrow"><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][0]" value="1" /></td>\
 
			<td class="cbrow"><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][1]" value="1" /></td>\
 
			<td class="cbrow"><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][2]" value="1" /></td>\
 
			<td class="cbrow"><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][3]" value="1" /></td>\
 
			<td class="cbrow"><input type="checkbox" class="daysRequired" name="postData[' + cnum + '][' + snum + '][days][4]" value="1" /></td>';
 
	
 
		return result;
 
	}
 
@@ -237,7 +252,11 @@
 
      }
 

	
 
    });
 
    
 

	
 
  jQuery('.advanced').hide();    
 
  jQuery('#showadvanced').click( function() {
 
    jQuery('#showadvanced').hide();
 
    jQuery('.advanced').slideToggle();
 
  });
 
});
 

	
styles/general.css
Show inline comments
 
@@ -64,6 +64,7 @@
 

	
 
}
 
.gray {
 
  border: 1px dashed #999;
 
  text-align: center!important;
 
  background: #BBB!important;
 
  cursor:default;
0 comments (0 inline, 0 general)