summaryrefslogtreecommitdiff
path: root/smarty_bit/block.jstabs.php
blob: c332b37588d99f67c54200b7324788284be1c4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php 
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * Smarty {jstabs} block plugin
 *
 * Type:		block
 * Name:		jstabs
 * Input:		
 * Abstract:	Used to enclose a set of tabs
 */
function smarty_block_jstabs($params, $content, &$smarty) {
	global $gBitSystem;
	$ret  = '<div class="tabpane">'.$content.'</div>';
	if( $gBitSystem->mPrefs['disable_jstabs'] != 'y' ) {
		$ret .= "<script type=\"text/javascript\">//<![CDATA[\nsetupAllTabs();\n//]]></script>";
	}
	return $ret;
}
?>