diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-10-23 14:40:24 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-10-23 14:40:24 +0000 |
| commit | a19739c746b3e1ee611000baaaad60026b4e78a9 (patch) | |
| tree | a5cb1e424a7f587870d96325a0e11b50dc5a9ef1 /smarty_bit/block.jstabs.php | |
| parent | 32506efbcaba41d85c0f41197b92eea224058323 (diff) | |
| download | kernel-a19739c746b3e1ee611000baaaad60026b4e78a9.tar.gz kernel-a19739c746b3e1ee611000baaaad60026b4e78a9.tar.bz2 kernel-a19739c746b3e1ee611000baaaad60026b4e78a9.zip | |
merge recent changes into HEAD
Diffstat (limited to 'smarty_bit/block.jstabs.php')
| -rw-r--r-- | smarty_bit/block.jstabs.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/smarty_bit/block.jstabs.php b/smarty_bit/block.jstabs.php index 8124fc1..b34aa85 100644 --- a/smarty_bit/block.jstabs.php +++ b/smarty_bit/block.jstabs.php @@ -13,12 +13,21 @@ * Input: * Abstract: Used to enclose a set of tabs */ -function smarty_block_jstabs($params, $content, &$gBitSmarty) { +function smarty_block_jstabs( $params, $content, &$gBitSmarty ) { global $gBitSystem; - $ret = '<div class="tabpane">'.$content.'</div>'; - if( $gBitSystem->mPrefs['disable_jstabs'] != 'y' ) { - $ret .= "<script type=\"text/javascript\">//<![CDATA[\nsetupAllTabs();\n//]]></script>"; + extract( $params ); + + if( $gBitSystem->mPrefs['disable_jstabs'] == 'y' ) { + $ret .= '<div class="tabpane">'.$content.'</div>'; + } else { + $id = 1000000 * microtime(); + $ret .= '<div class="tabpane" id="id_'.$id.'">'; + $ret .= "<script type=\"text/javascript\">//<![CDATA[\ntabPane = new WebFXTabPane( document.getElementById( 'id_".$id."' ), true );\n//]]></script>"; + $ret .= $content; + $ret .= "<script type=\"text/javascript\">//<![CDATA[\nsetupAllTabs();\nvar tabPane;".( !empty( $tab ) ? "\ntabPane.setSelectedIndex( $tab );" : '' )."\n//]]></script>"; + $ret .= '</div>'; } + return $ret; } ?> |
