Changeset - 19228cef8a8b
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2011-03-22 16:31:05
ohnobinki@ohnopublishing.net
Display an informative not on the Registration Codes dialogue to indicate that it is relevant to the currently selected tab.
2 files changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
inc/class.schedule.php
Show inline comments
 
@@ -402,13 +402,16 @@ class Schedule
 
		}
 
	  }
 
	/* ensure that early times are actually first ;-) */
 
	if ($sort_time)
 
	  sort($time);
 

	
 
        echo '<div id="regDialog" title="Registration Codes"></div>';
 
        echo '    <div id="regDialog" title="Registration Codes">' . PHP_EOL
 
	  . '      <div id="regDialog-content"></div>' . PHP_EOL
 
	  . '      <p id="regDialog-disclaimer" class="graytext"><em>Note: The registration information above corresponds to the sections displayed on the currently selected tab.</em></p>'
 
	  . '    </div>';
 
	echo '<div id="tabs">' . "\n" .
 
               '<div id="show-box" class="show-buttons">
 
                  <form action="#"><p class="nospace">
 
                    <label><strong>Display:</strong></label>
 
                    <input id="show-prof" name="show-prof" type="checkbox" checked="checked" /><label for="show-prof">Professor</label>
 
                    <input id="show-location" name="show-location" type="checkbox" /><label for="show-location">Room</label>
scripts/displayTables.js
Show inline comments
 
@@ -104,23 +104,23 @@ jQuery(document).ready( function()
 
  {
 
      jQuery('#show-box input').change(show_box_change);
 
      jQuery('#show-box input').change();
 

	
 
      jQuery("#regDialog").dialog({ modal: true, width: 550, resizable: false, draggable: false, autoOpen: false });   
 
      jQuery('#regCodes').click( function() {
 
        jQuery('#regDialog').html('<p>Loading registration information...</p>');
 
        jQuery('#regDialog-content').html('<p>Loading registration information...</p>');
 

	
 
	/* hmm... why isn't this information just stored in a global JS variable? */
 
	var tab_i = jQuery('#tabs').tabs('option','selected');
 
	var tab_fragment_i = /-([^-]+)$/.exec(jQuery('#the-tabs li:eq(' + tab_i + ') a').attr('href'))[1];
 
        var tab_course_data_json_selector = '.course-data-' + tab_fragment_i;
 
	
 
        var tab_course_data_json = jQuery(tab_course_data_json_selector).text();
 
        var tab_course_data = eval('(' + tab_course_data_json + ')');
 

	
 
	slate_permutate_load(jQuery('#regDialog'), {school_registration_html: true, courses: tab_course_data});
 
	slate_permutate_load(jQuery('#regDialog-content'), {school_registration_html: true, courses: tab_course_data});
 

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

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