Changeset - f0d9f37354b5
[Not reviewed]
default
0 8 0
Ethan Zonca - 15 years ago 2011-03-24 20:16:20
ez@ethanzonca.com
qTips added on output page to show data, course title inputs made pseudo-invisible. Other minor changes. Cedarville crawler now records course titles.
8 files changed with 42 insertions and 10 deletions:
0 comments (0 inline, 0 general)
inc/class.course.inc
Show inline comments
 
@@ -29,7 +29,7 @@ include_once 'class.section.php';
 
class Course implements IteratorAggregate
 
{
 
  private $name;	// String
 
  private $title;
 
  private $title;       // String
 
  private $sections;	// Array of sections
 
  private $nsections;	// int
 
  /**
inc/class.page.php
Show inline comments
 
@@ -112,6 +112,7 @@ class page
 
    $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['displayTables'] = '<script type="text/javascript" src="scripts/displayTables.js"></script>';
 
    $this->headCode['inPlace'] = '<script type="text/javascript" src="scripts/jeip.js"></script>';
 

	
 
    $this->pagetitle = $ntitle;
 
    $this->scripts = $nscripts;
inc/class.schedule.php
Show inline comments
 
@@ -288,7 +288,7 @@ class Schedule
 
      $headcode = array('jQuery', 'jQueryUI', 'uiTabsKeyboard', 'outputStyle', 'outputPrintStyle', 'displayTables');
 
    }
 
    else {
 
      $headcode = array('outputStyle',  'jQuery', 'jQueryUI', 'jAddress', 'uiTabsKeyboard', 'displayTables');
 
      $headcode = array('outputStyle',  'jQuery', 'jQueryUI', 'jAddress', 'uiTabsKeyboard', 'qTip2','displayTables');
 
    }
 
    $outputPage = page::page_create(htmlentities($this->getName()), $headcode);
 
    $outputPage->head();
 
@@ -524,12 +524,14 @@ class Schedule
 
					$title = '';
 
				      else
 
					$title .= ' ';
 

	
 
				      $carret = '&#013;' . htmlentities("<br />");
 
				      echo '            <td rowspan="' . $rowspan[$dayLoop]
 
					. '" class="' . $single_multi . ' class' . $j
 
					. '" title="' . htmlentities($title, ENT_QUOTES)
 
					. 'prof: ' . htmlentities($section->getProf(), ENT_QUOTES)
 
					. ', room: ' . htmlentities($current_meeting->getLocation(), ENT_QUOTES)
 
					. ', type: ' . htmlentities($current_meeting->type_get(), ENT_QUOTES) . '">'
 
					. '" class="qTipCell ' . $single_multi . ' class' . $j
 
					. '" title="' . htmlentities($title, ENT_QUOTES) . $carret
 
					. 'Prof: ' . htmlentities($section->getProf(), ENT_QUOTES) . $carret
 
					. 'Room: ' . htmlentities($current_meeting->getLocation(), ENT_QUOTES) . $carret
 
					. 'Type: ' . htmlentities($current_meeting->type_get(), ENT_QUOTES) . $carret . '">'
 
					. '<span class="course-title block">' . htmlentities($title) . '</span>' . PHP_EOL
 
					. htmlentities($course->getName(), ENT_QUOTES) . '-'
 
					. htmlentities($section->getLetter(), ENT_QUOTES) . "\n"
input.php
Show inline comments
 
@@ -24,7 +24,7 @@ include_once 'inc' . DIRECTORY_SEPARATOR
 
include_once 'inc' . DIRECTORY_SEPARATOR . 'class.page.php';
 
require_once('inc' . DIRECTORY_SEPARATOR . 'schedule_store.inc');
 

	
 
$scripts = array('jQuery', 'jQueryUI', 'qTip2','schedInput');
 
$scripts = array('jQuery', 'jQueryUI', 'qTip2', 'inPlace', 'schedInput');
 
$inputPage = page::page_create('Scheduler', $scripts, FALSE);
 

	
 
$schedule_store = FALSE;
school.d/cedarville.crawl.inc
Show inline comments
 
@@ -188,6 +188,7 @@ function cedarville_crawl(array &$semest
 
	    }
 

	
 
	  $instructor = $course_table[3];
 
          $title = $course_table[2];
 

	
 
	  /*
 
	   * Each course may have multiple meeting times associated
 
@@ -258,7 +259,7 @@ function cedarville_crawl(array &$semest
 

	
 
	  $semester->section_add($section_parts['department'], $section_parts['course'],
 
				 new Section($section_parts['section'], $meetings,
 
					     $synonym, $instructor));
 
					     $synonym, $instructor), $title);
 
	}
 
    }
 

	
scripts/displayTables.js
Show inline comments
 
@@ -121,8 +121,22 @@ jQuery(document).ready( function()
 

	
 
        jQuery("#regDialog").dialog('open');
 

	
 
	
 
	
 
	return false;
 
      });
 

	
 
      jQuery('.qTipCell').qtip(
 
       {
 
          style: {
 
            tip: true,
 
            classes: "ui-tooltip-dark ui-tooltip-shadow ui-tooltip-rounded"
 
          },
 
          position:{
 
            my: 'bottom left',
 
            at: 'center',
 
          }
 
      });  
 
  }
 
);
 

	
scripts/scheduleInput.js
Show inline comments
 
@@ -264,7 +264,7 @@ function add_class_n(course_id, title)
 
		course_remove(slate_permutate_course_free);
 

	
 
		sectionsOfClass[classNum] = 0; // Initialize at 0
 
		jQuery('#jsrows').append('<tr id="tr-course-' + classNum + '" class="class class' + classNum + ' pclass' + classNum + '"><td class="nameTip"><input type="text" id="input-course-' + classNum + '" class="classRequired defText className'+classNum+' className" title="Class Name" name="postData[' + classNum + '][name]" value="' + course_id + '" /></td><td colspan="10"><label for="postData[' + classNum + '][title]">Course Title:</label><input type="text" name="postData[' + classNum + '][title]" class="course-title-entry" value="' + title + '" /></td><td class="tdInput"><div class="deleteClass"><input type="button" value="Remove" class="gray" /></div></td><td class="none"><button type="button" class="addSection gray">+</button></td></tr>');
 
		jQuery('#jsrows').append('<tr id="tr-course-' + classNum + '" class="class class' + classNum + ' pclass' + classNum + '"><td class="nameTip"><input type="text" id="input-course-' + classNum + '" class="classRequired defText className'+classNum+' className" title="Class Name" name="postData[' + classNum + '][name]" value="' + course_id + '" /></td><td colspan="10"><input type="text" name="postData[' + classNum + '][title]" class="inPlace course-title-entry" value="' + title + '" /></td><td class="tdInput"><div class="deleteClass"><input type="button" value="Remove" class="gray" /></div></td><td class="none"><button type="button" class="addSection gray">+</button></td></tr>');
 

	
 
		/* store classNum as course_i into the <tr />: */
 
		jQuery('#tr-course-' + classNum).data({course_i: classNum});
 
@@ -575,4 +575,13 @@ jQuery(document).ready(function() {
 
	});
 

	
 

	
 
        //-------------------------------------------------
 
        // Style course titles as inputs when clicked
 
        //-------------------------------------------------
 
        jQuery('.course-title-entry').live('click', function() {
 
          jQuery(this).toggleClass('inPlace');
 
        });
 
        jQuery('.course-title-entry').live('blur', function() {
 
          jQuery(this).addClass('inPlace');
 
        });
 
});
styles/general.css
Show inline comments
 
@@ -390,3 +390,8 @@ a:hover {
 
  font: normal bold 1.2em sans-serif;
 
}
 

	
 
.inPlace {
 
  color: #000;
 
  border: none;
 
  background: transparent;
 
}
0 comments (0 inline, 0 general)