Changeset - 1dcc2f84c9eb
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2011-03-22 18:53:28
ohnobinki@ohnopublishing.net
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.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
inc/class.schedule.php
Show inline comments
 
@@ -555,25 +555,25 @@ class Schedule
 
			}
 
			$filled = FALSE;
 
		}
 
		
 
		// End of row
 
		echo "          </tr>\n";
 
	      }
 

	
 
	    /* presort */
 
	    ksort($permutation_courses);
 
	    // End of table
 
	    echo "        </table>\n"
 
              . '         <span class="course-data course-data-'.$i.'">'.  htmlentities(json_encode($permutation_courses)) . "</span>\n"
 
              . '         <span class="course-data">'.  htmlentities(json_encode($permutation_courses)) . "</span>\n"
 
	      . '      </div> <!-- id="section' . ($i + 1) . "\" -->\n";
 
	  }
 

	
 
          echo "    </div> <!-- class=\"scontent\" -->\n"
 
	     . "  </div> <!-- class=\"scroller\" -->\n"
 
	     . "</div> <!-- id=\"my-glider\" -->\n"
 
	     . $footcloser; // Closes off the content div
 
      } else {
 
      echo '<html><body><p>There are no possible schedules. Please <a href="input.php?s='.$this->id.'">try again</a>.</p></body></html>';
 
    }
 

	
 
    echo "<p id=\"possiblestats\">There were a total of " . $this->possiblePermutations . " possible permutations. Only " . $this->nPermutations . " permutations had no class conflicts.</p>";
scripts/displayTables.js
Show inline comments
 
@@ -103,25 +103,25 @@ function slate_permutate_load(target, da
 
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-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_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 + ')');
 

	
 
	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)