Changeset - 03eba98b2ee4
[Not reviewed]
default
0 4 0
ethanzonca - 15 years ago 2010-10-08 23:21:29

Various visual and javascript changes
4 files changed with 40 insertions and 6 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -40,6 +40,7 @@ class page
 
    $this->headCode['outputStyle'] = '<link rel="stylesheet" href="styles/output.css" type="text/css" media="screen" charset="utf-8" />'; 
 
    $this->headCode['gliderHeadcode'] = '<link rel="stylesheet" href="styles/glider.css" type="text/css" media="screen" charset="utf-8" />'; 
 
   $this->headCode['uiTabsKeyboard'] = '<script type="text/javascript" src="scripts/uiTabsKeyboard.js"></script>'; 
 
   $this->headCode['uiInputKeyboard'] = '<script type="text/javascript" src="scripts/uiInputKeyboard.js"></script>';
 
   $this->pagetitle = $ntitle;
 
   $this->scripts = $nscripts;
 

	
input.php
Show inline comments
 
@@ -6,7 +6,7 @@ include_once 'class.section.php';
 
include_once 'inc/class.page.php';
 
require_once('inc/schedule_store.inc');
 

	
 
$scripts = array('jQuery', 'jQueryUI', 'jValidate','schedInput');
 
$scripts = array('jQuery', 'jQueryUI', 'jValidate','schedInput','uiInputKeyboard');
 
$inputPage = new page('Scheduler', $scripts, FALSE);
 

	
 
$schedule_store = FALSE;
 
@@ -42,6 +42,7 @@ var sectionsOfClass = Array();
 
$inputPage->showSavedScheds($_SESSION);
 
?>
 
<p>Welcome to SlatePermutate! To get started, enter in some of your classes, and add available sections for each class.</p>
 
<p style="color: #CCC"><em>Keyboard Shortcut: Press "c" to add a class</em></p>
 
<form method="post" action="process.php" id="scheduleForm">
 
<br />
 
<label>Schedule Name</label><br />
scripts/scheduleInput.js
Show inline comments
 
@@ -148,7 +148,7 @@
 
	//--------------------------------------------------
 
	function addRow(){
 
		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 defText" title="Class Name" name="postData[' + classNum + '][name]" /></td><td colspan="8"></td><td class="tdInput"><div class="addSection"><input type="button" value="Add section" /></div></td><td class="tdInput"><div class="deleteClass"><input type="button" value="Remove" /></div></td></tr>');
 
		jQuery('#jsrows').append('<tr title="' + classNum + '" class="class class' + classNum + '"><td><input type="text" class="required defText" title="Class Name" name="postData[' + classNum + '][name]" /></td><td colspan="8"></td><td class="tdInput"><div class="addSection"><input class="gray" type="button" value="Add section" /></div></td><td class="tdInput"><div class="deleteClass"><input class="gray" type="button" value="Remove" /></div></td></tr>');
 
		classNum++;
 
	};
 
	
 
@@ -184,7 +184,7 @@
 
	//--------------------------------------------------
 
	jQuery('.addSection').live('click', function() {
 
		sectionsOfClass[jQuery(this).parent().parent().attr("title")]++; // Increases sectionsOfClass[classNum]
 
		jQuery(this).parent().parent().after('<tr class="section class' + jQuery(this).parent().parent().attr("title") + '"><td class="none"></td>' + getCommonInputs(jQuery(this).parent().parent().attr("title")) + '<td><div class="deleteSection"><input type="button" value="x" /></div></td><td></td></tr>');
 
		jQuery(this).parent().parent().after('<tr class="section class' + jQuery(this).parent().parent().attr("title") + '"><td class="none"></td>' + getCommonInputs(jQuery(this).parent().parent().attr("title")) + '<td><div class="deleteSection"><input class="gray" type="button" value="x" /></div></td><td></td></tr>');
 
	});
 

	
 
	//--------------------------------------------------
 
@@ -224,4 +224,34 @@
 
	  jQuery('.advanced').slideToggle();
 
	});
 

	
 

	
 

	
 

	
 

	
 

	
 

	
 
  jQuery(document).keydown(function(e) {
 

	
 
    var direction = null;
 

	
 
   // handle cursor keys
 
   if (e.keyCode == 67) {
 
     // slide left
 
     direction = 'addrow';
 
   } 
 
   if (direction != null) {
 
    if (direction == 'addrow') {
 
       addRow();
 
    }
 
  }
 
 });
 

	
 

	
 

	
 

	
 

	
 

	
 

	
 

	
 

	
 
});
styles/general.css
Show inline comments
 
@@ -63,10 +63,10 @@ td.center {
 
  text-align:center;
 
}
 
.section:nth-child(even) {
 
  background: #DDDDDD;
 
  background: #CCC;
 
}
 
.section:nth-child(odd) {
 
  background: #AAAAAA;
 
  background: #EEE;
 
}
 
.none {
 
  background: #fff;
 
@@ -130,7 +130,9 @@ td.center {
 
  -webkit-border-radius: 5px;
 
  border: 1px solid #999;
 
  text-align: center!important;
 
  background: #92a689!important;
 
//  background: #92a689!important;
 
  background: #EEE;
 

	
 
  cursor:default;
 
}
 
.green:hover {
0 comments (0 inline, 0 general)