Changeset - 7c3278c804ca
[Not reviewed]
Mobile
0 2 0
Ethan Zonca - 14 years ago 2011-10-14 20:59:32
ez@ethanzonca.com
Initial work on mobile page class
2 files changed with 19 insertions and 17 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -67,31 +67,31 @@ class page
 
{
 

	
 
  /* Site-wide configuration options */
 
  private $base_title = 'SlatePermutate - Find the schedule that works for you!';
 
  private $doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"';
 
  private $htmlargs = 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"';
 
  protected $base_title = 'SlatePermutate - Find the schedule that works for you!';
 
  protected $doctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"';
 
  protected $htmlargs = 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"';
 

	
 
  private $pageGenTime = 0;
 
  protected $pageGenTime = 0;
 

	
 
  private $xhtml = FALSE;
 
  protected $xhtml = FALSE;
 

	
 
  /* Scripts and styles */
 
  private $headCode = array();
 
  protected $headCode = array();
 

	
 
  private $trackingcode = ''; // Tracking code
 
  private $pagetitle = ''; // Title of page
 
  private $scripts = array(); // Scripts to include on page
 
  protected $trackingcode = ''; // Tracking code
 
  protected $pagetitle = ''; // Title of page
 
  protected $scripts = array(); // Scripts to include on page
 

	
 
  /* the current school. See get_school(). */
 
  private $school;
 
  protected $school;
 

	
 
  private $semester;
 
  protected $semester;
 

	
 
  /*
 
   * Whether or not the user should be presented with the option to
 
   * change the school profile or semester.
 
   */
 
  private $school_semester_constant;
 
  protected $school_semester_constant;
 

	
 
  /**
 
   * \brief
 
@@ -124,6 +124,7 @@ class page
 

	
 
    $this->headCode['jQuery'] = '<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script>';
 
    $this->headCode['jQueryUI'] = '<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script><link rel="stylesheet" href="styles/jqueryui.css" type="text/css" media="screen" charset="utf-8" />';
 
    $this->headCode['jQueryUI-NoStyles'] =  '<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>';
 
    $this->headCode['jValidate'] = '<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.pack.js"></script>';
 
    $this->headCode['jAddress'] = '<script type="text/javascript" src="http://js.ohnopub.net/js/jquery.address-1.3.2.min.js"></script>';
 
    $this->headCode['jQuery.cuteTime'] = '<script type="text/javascript" src="http://ohnopub.net/~ohnobinki/CuteTime/js/jquery.cuteTime.js"></script>';
 
@@ -135,7 +136,8 @@ 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['jQueryMobile'] = '<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" /><script src="http://code.jquery.com/jquery-1.6.2.min.js"></script><script src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>';                                                                                                                         
 
    $this->headCode['mScheduleInput'] = '<script type="text/javascript" src="scripts/mSchedInput.js"></script>';                                                                                           
 
    $this->pagetitle = $ntitle;
 
    $this->scripts = $nscripts;
 

	
 
@@ -211,9 +213,9 @@ class page
 
   *        the current school and semester should be hidden. TRUE by
 
   *        default.
 
   */
 
  public static function page_create($title, array $scripts = array(), array $options = array())
 
  public static function page_create($title, array $nscripts = array(), array $options = array())
 
  {
 
    return new page(htmlentities($title, ENT_QUOTES, 'UTF-8'), $scripts, FALSE, $options);
 
    return new page(htmlentities($title, ENT_QUOTES, 'UTF-8'), $nscripts, FALSE, $options);
 
  }
 

	
 
  /**
 
@@ -632,7 +634,7 @@ class page
 
   * \brief
 
   *   Add a trailing slash to a path if one does not already exist
 
   */
 
  private function add_trailing_slash($path){
 
  protected function add_trailing_slash($path){
 
    if($path[strlen($path)-1] != '/') {
 
      return $path . "/";
 
    }
index.php
Show inline comments
 
@@ -27,7 +27,7 @@ require_once 'inc/class.page.php';
 
<h3>Find the schedule that works for you!</h3>
 
<p>Plan your next semester with SlatePermutate! SlatePermutate generates every possible schedule with the courses you enter to let you pick the schedule that fits your life.</p>
 

	
 
<p class="righttext" style="padding-right: 1em;"><a class="button blue large" href="input.php"><!--<img class="noborder" src="images/get-started.png" alt="Get Started" />-->Get Started</a></p>
 
<p class="righttext" style="padding-right: 1em;"><a class="button blue large" data-role="button" data-inline="true" data-theme="b" href="minput.php" data-ajax="false"><!--<img class="noborder" src="images/get-started.png" alt="Get Started" />-->Get Started</a></p>
 

	
 
<?php
 
$welcomepage->foot();
0 comments (0 inline, 0 general)