# HG changeset patch # User Nathan Phillip Brink # Date 2011-03-22 18:53:28 # Node ID 1dcc2f84c9eb0b504fddbd9b4c310e6ea4bbb40e # Parent da99c618fb1851e23b629ef9d1a85940f6a7606c Ensure that the registration codes shown actually correspond to the current tab. Previously, the registration codes for the following tab instead of the current tab were being displayed. diff --git a/inc/class.schedule.php b/inc/class.schedule.php --- a/inc/class.schedule.php +++ b/inc/class.schedule.php @@ -564,7 +564,7 @@ class Schedule ksort($permutation_courses); // End of table echo " \n" - . ' '. htmlentities(json_encode($permutation_courses)) . "\n" + . ' '. htmlentities(json_encode($permutation_courses)) . "\n" . ' \n"; } diff --git a/scripts/displayTables.js b/scripts/displayTables.js --- a/scripts/displayTables.js +++ b/scripts/displayTables.js @@ -112,7 +112,7 @@ jQuery(document).ready( function() /* 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_selector = '#tabs-' + tab_fragment_i + ' .course-data'; var tab_course_data_json = jQuery(tab_course_data_json_selector).text(); var tab_course_data = eval('(' + tab_course_data_json + ')');