Changeset - 6666da63243b
[Not reviewed]
default
0 2 0
Ethan Zonca - 15 years ago 2011-02-25 21:06:34
ez@ethanzonca.com
Tabs now cause the url to change, and the hashtag in the URL selects the tab
2 files changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
inc/class.page.php
Show inline comments
 
@@ -103,6 +103,7 @@ class page
 
    $this->headCode['jQuery'] = '<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>';
 
    $this->headCode['jQueryUI'] = '<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script><link rel="stylesheet" href="styles/jqueryui.css" type="text/css" media="screen" charset="utf-8" />';
 
    $this->headCode['jValidate'] = '<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.pack.js"></script>';
 
    $this->headCode['jAddress'] = '<script type="text/javascript" src="http://protofusion.org/scripts/jquery.address-1.3.2.min.js"></script>';
 
    $this->headCode['qTip'] = '<script type="text/javascript" src="http://ohnopub.net/js/jquery.qtip-1.0.min.js"></script>';
 
    $this->headCode['schedInput'] = '<script type="text/javascript" src="scripts/scheduleInput.js"></script>';
 
    $this->headCode['outputPrintStyle'] = '<link rel="stylesheet" href="styles/print.css" type="text/css" media="screen" charset="utf-8" />';
inc/class.schedule.php
Show inline comments
 
@@ -244,7 +244,7 @@ class Schedule
 
      $headcode = array('jQuery', 'jQueryUI', 'uiTabsKeyboard', 'outputStyle', 'outputPrintStyle', 'displayTables');
 
    }
 
    else {
 
      $headcode = array('outputStyle',  'jQuery', 'jQueryUI', 'uiTabsKeyboard', 'displayTables');
 
      $headcode = array('outputStyle',  'jQuery', 'jQueryUI', 'jAddress', 'uiTabsKeyboard', 'displayTables');
 
    }
 
    $outputPage = page::page_create(htmlentities($this->getName()), $headcode);
 
    $outputPage->head();
 
@@ -274,6 +274,14 @@ class Schedule
 
      echo '<script type="text/javascript">';
 
      echo '  jQuery(document).ready( function() {';
 
      echo '    jQuery("#tabs").tabs();';
 
      echo '    jQuery.address.change(function(event){';
 
      echo '      jQuery("#tabs").tabs( "select" , window.location.hash );';
 
      echo '    });';
 
      echo '    jQuery("#tabs").bind("tabsselect", function(event, ui) {';
 
      echo '      window.location.hash = ui.tab.hash;';
 
      echo '    });';
 

	
 

	
 
      echo '    jQuery("#sharedialog").dialog({ modal: true, width: 550, resizable: false, draggable: false, autoOpen: false });';
 
      echo '    jQuery("#share").click( function() {
 
                  jQuery("#sharedialog").dialog("open");
0 comments (0 inline, 0 general)