# HG changeset patch # User Ethan Zonca # Date 2010-12-03 00:48:17 # Node ID afd821c1486891508f1e93257a74723a4c484852 # Parent 2105c4db86cf4ae21d94274eef82b7fe3de38b08 Added tip bubbles to Class ID fields as a sample of functionality we should implement so users know what they need to do diff --git a/admin.php b/admin.php --- a/admin.php +++ b/admin.php @@ -145,17 +145,17 @@

You are currently running version . The latest available release is VERSION.

Rehash

-

Last full rehash ocurred on .

+

Last rehash ocurred on .

Purge

-

The cache currently holds schedules.

+

The cache currently contains schedules.

headCode['jQuery'] = ''; $this->headCode['jQueryUI'] = ''; $this->headCode['jValidate'] = ''; + $this->headCode['qTip'] = ''; $this->headCode['schedInput'] = ''; $this->headCode['outputPrintStyle'] = ''; $this->headCode['outputStyle'] = ''; diff --git a/input.php b/input.php --- a/input.php +++ b/input.php @@ -24,9 +24,11 @@ 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(); diff --git a/scripts/scheduleInput.js b/scripts/scheduleInput.js --- a/scripts/scheduleInput.js +++ b/scripts/scheduleInput.js @@ -211,6 +211,22 @@ function genOptionHtml(value, content, t return '\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. @@ -277,7 +293,7 @@ function add_sections(cnum, data) } }); - + addTips('.class'+classNum+ ' td:first'); classNum++; return (classNum - 1); @@ -394,4 +410,8 @@ jQuery(document).ready(function() { jQuery('#showadvanced').hide(); jQuery('.advanced').slideToggle(); }); + + + + });