diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -96,7 +96,7 @@ class Schedule { $temp = $this->classStorage[$counter]->getName(); - if((strcmp($temp,$course_name)) == 0) + if(strcmp($temp,$course_name) == 0) { $found = true; } else { @@ -214,7 +214,7 @@ class Schedule $filled = false; $time = array(700,730,800,830,900,930,1000,1030,1100,1130,1200,1230,1300,1330,1400,1430,1500,1530,1600,1630,1700,1730,1800,1830,1900,1930,2000,2030,2100,2130, 2200); - define('SP_PERMUTATIONS_PER_PAGE', 256); + define('SP_PERMUTATIONS_PER_PAGE', 256); /** @TODO: Define this in config.inc */ $npages = ceil($this->nPermutations / SP_PERMUTATIONS_PER_PAGE); $page = 0; @@ -243,7 +243,7 @@ class Schedule - if(isset($_REQUEST['print'])){ + if(isset($_REQUEST['print'])) { echo ''; echo '
'; @@ -264,43 +264,41 @@ class Schedule } else { echo ''; /* Close document.ready for jquery */ - echo ''; - echo 'Having problems? Let us know.
Keyboard Shortcut: Left and right arrow keys switch between schedules
'; + echo ' jQuery(document).ready( function() {'; + echo ' jQuery("#tabs").tabs();'; + echo ' jQuery("#sharedialog").dialog({ modal: true, width: 550, resizable: false, draggable: false, autoOpen: false });'; + echo ' jQuery("#share").click( function() { + jQuery("#sharedialog").dialog("open"); + });'; + echo ' jQuery(\'#printItems\').click( function() { + window.location = "'.$_SERVER['SCRIPT_NAME'].'?s='.$this->id_get().'&print=" + (jQuery(\'#tabs\').tabs(\'option\',\'selected\') + 1); + }); + jQuery(\'#cancelItems\').click( function() { + jQuery(\'#selectItemsInput\').hide(); + });'; + echo ' }); + '; + + echo ''; + echo ''; + echo 'Having problems? Let us know.
'; + echo 'Keyboard Shortcut: Left and right arrow keys switch between schedules
'; } echo "\n"; if($this->nPermutations > 0) { - echo "