Changeset - afd821c14868
[Not reviewed]
default
0 4 0
Ethan Zonca - 15 years ago 2010-12-03 00:48:17
ez@ethanzonca.com
Added tip bubbles to Class ID fields as a sample of functionality we should implement so users know what they need to do
4 files changed with 29 insertions and 6 deletions:
0 comments (0 inline, 0 general)
admin.php
Show inline comments
 
@@ -136,27 +136,27 @@
 
	$(function() {
 
		$( "#datepicker" ).datepicker();
 
                $( "#datepicker" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
 

	
 
	});
 
</script>
 

	
 

	
 
<h3>Update</h3>
 
<p>You are currently running version <?php echo SP_PACKAGE_VERSION ?>. The latest available release is VERSION.</p>
 

	
 
<h3>Rehash</h3>
 
<p>Last full rehash ocurred on  <?php echo getLastRehash() ?>.</p>
 
<p>Last rehash ocurred on  <?php echo getLastRehash() ?>.</p>
 
<ul>
 
  <li><a href="admin.php?rehash">Rehash All Institutions</a></li>
 
  <li><?php schoolsDropList(); ?> <a href="admin.php?rehash">Rehash Institution</a> </li>
 
  <li><form action="admin.php">Rehash schedules for <?php schoolsDropList(); ?> <input type="submit" value="Go &raquo;" /> </form></li>
 
</ul>
 

	
 
<h3>Purge</h3>
 
<p>The cache currently holds <?php echo getNumSaved(); ?> schedules.</p>
 
<p>The cache currently contains <?php echo getNumSaved(); ?> schedules.</p>
 
<ul>
 
  <li><a href="admin.php?purge">Purge Entire Cache</a></li>
 
  <li><form action="admin.php">Purge cache up to <input type="text" name="purgetodate" size="8" id="datepicker"/><input type="submit" value="Go&raquo;" /></form></li>
 
  <li><form action="admin.php">Purge cache up to <input type="text" name="purgetodate" size="8" id="datepicker"/> <input type="submit" value="Go &raquo;" /></form></li>
 
</ul>
 

	
 
<?php
 
$adminpage->foot();
inc/class.page.php
Show inline comments
 
@@ -85,24 +85,25 @@ class page
 
   *   Must be a valid HTML string (i.e., escaped with htmlentities()).
 
   */
 
  public function __construct($ntitle, $nscripts = array(), $immediate = TRUE)
 
  {
 
    global $ga_trackers;
 

	
 
    require_once('school.inc');
 

	
 
    // Scripts and styles available to include
 
    $this->headCode['jQuery'] = '<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>';
 
    $this->headCode['jQueryUI'] = '<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/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['jValidate'] = '<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.pack.js"></script>';
 
    $this->headCode['qTip'] = '<script type="text/javascript" src="http://bazaar.launchpad.net/%7Ecraig.craigsworks/qtip/1.0/download/head%3A/jquery.qtip1.0.min.j-20100208190353-yfo386e4500jv3h5-2/jquery.qtip-1.0.min.js"></script>';
 
    $this->headCode['schedInput'] = '<script type="text/javascript" src="scripts/scheduleInput.js"></script>';
 
    $this->headCode['outputPrintStyle'] = '<link rel="stylesheet" href="styles/print.css" type="text/css" media="screen" charset="utf-8" />';
 
    $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['displayTables'] = '<script type="text/javascript" src="scripts/displayTables.js"></script>';
 
    $this->pagetitle = $ntitle;
 
    $this->scripts = $nscripts;
 

	
 
   /* Compliant browsers which care, such as gecko, explicitly request xhtml: */
 
   if(!empty($_SERVER['HTTP_ACCEPT'])
 
      && strpos($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') !== FALSE
input.php
Show inline comments
 
@@ -15,27 +15,29 @@
 
 * GNU Affero General Public License for more details.
 
 *
 
 * You should have received a copy of the GNU Affero General Public License
 
 * along with SlatePermutate.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
include_once 'class.schedule.php';
 
include_once 'class.class.php';
 
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','qTip','schedInput');
 
$inputPage = new page('Scheduler', $scripts, FALSE);
 

	
 

	
 

	
 
$schedule_store = FALSE;
 
$sch = FALSE;
 
$school = $inputPage->get_school();
 

	
 
if (isset($_REQUEST['s']))
 
  {
 
    $schedule_store = schedule_store_init();
 
    $schedule_id = (int)$_REQUEST['s'];
 
    $sch = schedule_store_retrieve($schedule_store, $schedule_id);
 
  }
 

	
 
$my_hc = 'jQuery(document).ready(
scripts/scheduleInput.js
Show inline comments
 
@@ -202,24 +202,40 @@ function genSectionHtml_n(cnum, name, sy
 
/**
 
 * Outputs an <option/> element. It will inlcude selected="selected"
 
 * if the value param equals the test_value param.
 
 */
 
function genOptionHtml(value, content, test_value)
 
{
 
    var selected = ' selected="selected"';
 
    if (value != test_value)
 
	selected = '';
 
    return '<option value="' + value + '"' + selected + '>' + content + "</option>\n";
 
}
 

	
 

	
 
/** Add tooltips for user guidance */
 
function addTips(id) {
 
  jQuery(id).qtip({
 
    content: 'Type your class ID (such as PEF-1010)',
 
    style: {
 
      name: 'dark',
 
      tip: true
 
    },
 
/*    show: { ready: false }, */
 
/*    hide: { when: { event: 'inactive' } }, */
 
    corner: { target: 'topMiddle', tooltip: 'bottomMiddle' },
 
  });
 
}
 

	
 

	
 
/**
 
 * \brief
 
 *   Add a section to a class.
 
 */
 
function add_section_n(cnum, name, synonym, stime, etime, days, prof, location, type)
 
{
 
    jQuery('.pclass'+cnum).after(genSectionHtml_n(cnum, name, synonym, stime, etime, days, prof, location, type));
 
    sectionsOfClass[cnum] ++;
 
}
 
function add_section(cnum)
 
{
 
    return add_section_n(cnum, '', '', '', '', {'m':false, 't':false, 'w':false, 'h':false, 'f':false}, '', '', '');
 
@@ -268,25 +284,25 @@ function add_sections(cnum, data)
 
							      {
 
								  if (data.sections)
 
								      {
 
									  add_sections(this.class_num, data);
 
									  add_class();
 
								      }
 
							      }
 
						      }
 
						      );
 
				    }
 
			    });
 

	
 

	
 
		addTips('.class'+classNum+ ' td:first');
 
		classNum++;
 

	
 
		return (classNum - 1);
 
	};
 
function add_class()
 
{
 
    return add_class_n('');
 
}
 

	
 

	
 
/**
 
 * \brief
 
@@ -385,13 +401,17 @@ jQuery(document).ready(function() {
 
	    }
 
	});
 
	jQuery(".defText").blur();
 

	
 
	//--------------------------------------------------
 
	// Show/Hide advanced items
 
	//--------------------------------------------------
 
	jQuery('.advanced').hide();    
 
	jQuery('#showadvanced').click( function() {
 
		jQuery('#showadvanced').hide();
 
		jQuery('.advanced').slideToggle();
 
	});
 

	
 

	
 

	
 

	
 
});
0 comments (0 inline, 0 general)