Changeset - 7c7cf7ef7bf7
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2011-03-21 22:06:06
ohnobinki@ohnopublishing.net
Fix displaying registration codes for tabs on pages other than the first one (which happens when pagination occurs).
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
scripts/displayTables.js
Show inline comments
 
@@ -28,40 +28,42 @@ function show_box_change()
 
	{
 
	    /* convert from 'show-prof' back to 'prof' */
 
	    var css_class = name.substr(name.indexOf('-') + 1);
 
	    if (jQuery('#' + name + ':checked').size())
 
		{
 
		    jQuery('.' + css_class).show();
 
		}
 
	    else
 
		{
 
		    jQuery('.' + css_class).hide();
 
		}
 
	}
 

	
 
    return false;
 
}
 

	
 
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('#regDialogList').empty();
 
        var currSec = '.syns' + jQuery('#tabs').tabs('option','selected');
 

	
 
	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 currSec = '.syns' + tab_fragment_i;
 
	
 
        var jHtml = jQuery(currSec).html();
 
        var secs = eval('(' + jHtml + ')');
 
        var output = '<p class=\'synList\'>';
 
        for( var i in secs ) {
 
          output = output + secs[i] + '<br />';
 
        }
 
        output = output + '</p>';
 
        jQuery('#regDialogList').append(output);
 

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

	
0 comments (0 inline, 0 general)