Changeset - 6c9e24886620
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2010-10-17 01:16:16
ohnobinki@ohnopublishing.net
Use 'h' for Thursday instead of 'u'. There are probably other stray places still using 'u' somehow...
2 files changed with 2 insertions and 7 deletions:
0 comments (0 inline, 0 general)
class.section.php
Show inline comments
 
@@ -255,25 +255,25 @@ class Section
 

	
 
    $ret['section'] = strtoupper($section_matches[1]);
 

	
 
    return $ret;
 
  }
 

	
 
  /**
 
   * \brief
 
   *   Get an array of information needed by the AJAX stuff.
 
   */
 
  public function to_json_array()
 
  {
 
    static $daymap = array(0 => 'm', 1 => 't', 2 => 'w', 3 => 'u', 4 => 'f');
 
    static $daymap = array(0 => 'm', 1 => 't', 2 => 'w', 3 => 'h', 4 => 'f');
 

	
 
    $json_array = array('section' => $this->letter,
 
			'prof' => $this->prof,
 
			'time_start' => $this->start,
 
			'time_end' => $this->tend,
 
			'days' => array(),
 
			'synonym' => $this->synonym,
 
			'room' => $this->room,
 
			);
 
    for ($day = 0; $day < 5; $day ++)
 
      $json_array['days'][$daymap[$day]] = $this->getDay($day);
 

	
scripts/scheduleInput.js
Show inline comments
 
@@ -149,30 +149,25 @@ function genOptionHtml(value, content, t
 

	
 
/**
 
 * Add a list of sections gotten via an AJAX call.
 
 */
 
function add_sections(cnum, data)
 
{
 
    var i;
 
    if (!data.sections)
 
	return;
 
    for (i = data.sections.length - 1; i >= 0; i --)
 
	{
 
	    section = data.sections[i];
 
	    days = section.days;
 
	    if (days.u)
 
		days.h = days.u;
 
	    else
 
		days.h = false;
 
	    add_section_n(cnum, section.section, section.synonym, section.time_start, section.time_end, days, section.prof);
 
	    add_section_n(cnum, section.section, section.synonym, section.time_start, section.time_end, section.days, section.prof);
 
	}
 
}
 

	
 
	//--------------------------------------------------
 
	// Adds a new class to the input.
 
	//--------------------------------------------------
 
	function add_class_n(name)
 
	{
 
		sectionsOfClass[classNum] = 0; // Initialize at 0
 
		jQuery('#jsrows').append('<tr title="' + classNum + '" class="class class' + classNum + ' pclass' + classNum + '"><td><input type="text" class="className required defText className'+classNum+'" title="Class Name" name="postData[' + classNum + '][name]" value="' + name + '" /></td><td colspan="8"></td><td class="tdInput"><div class="addSection"><input type="button" value="Add section" class="gray" /></div></td><td class="tdInput"><div class="deleteClass"><input type="button" value="Remove" class="gray" /></div></td></tr>');
 
		jQuery('.className' + classNum).autocomplete({
 
			source: "auto.php",
0 comments (0 inline, 0 general)