summaryrefslogtreecommitdiff
path: root/smartyplugins/block.jstab.php
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2013-05-15 13:27:23 -0400
committerspiderr <spider@viovio.com>2013-05-15 13:27:23 -0400
commit51a1f55df1f93d21389e661cfd1b0d1febfe72c3 (patch)
tree7300f74d254eb95652b59fd1aa9aaac6d54d6e52 /smartyplugins/block.jstab.php
parent163adc6c9f1a262954c2bf8c430e9472cc7c1e1c (diff)
downloadthemes-51a1f55df1f93d21389e661cfd1b0d1febfe72c3.tar.gz
themes-51a1f55df1f93d21389e661cfd1b0d1febfe72c3.tar.bz2
themes-51a1f55df1f93d21389e661cfd1b0d1febfe72c3.zip
fix passed in onclick, style, and class for jstab
Diffstat (limited to 'smartyplugins/block.jstab.php')
-rw-r--r--smartyplugins/block.jstab.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/smartyplugins/block.jstab.php b/smartyplugins/block.jstab.php
index 51c1d78..ceae995 100644
--- a/smartyplugins/block.jstab.php
+++ b/smartyplugins/block.jstab.php
@@ -17,16 +17,15 @@
function smarty_block_jstab( $pParams, $pContent, &$gBitSmarty, $pRepeat ) {
if( empty( $pRepeat ) ){
global $jsTabLinks;
- // if this is modified, please adjust the preg_match_all() pattern in block.jstabs.php
- $pClass = isset( $pParams['class'] ) ? ' '.$pParams['class'] : '';
-
- $tClass = isset( $pParams['class'] ) ? ' '.$pParams['class'] : '';
+
+ $tClass = isset( $pParams['class'] ) ? ' class="'.$pParams['class'].'"' : '';
+ $tStyle = isset( $pParams['style'] ) ? ' style="'.$pParams['style'].'"' : '';
$tClick = isset( $pParams['onclick'] ) ? ' onclick="'.$pParams['onclick'].'"' : '';
$tTitle = tra( isset( $pParams['title'] ) ? $pParams['title'] : 'No Title' );
$tabId = strtolower( isset( $pParams['id'] ) ? $pParams['id'] : 'tab'.preg_replace("/[^A-Za-z0-9]/", '', $tTitle) );
- $jsTabLinks[] = '<li><a href="#'.$tabId.'" data-toggle="tab">' . htmlspecialchars( $tTitle ) . '</a></li>';
+ $jsTabLinks[] = '<li '.$tClick.' '.$tClass.' '.$tStyle.'><a href="#'.$tabId.'" data-toggle="tab">' . htmlspecialchars( $tTitle ) . '</a></li>';
$ret = '<div class="tab-pane" id="'.$tabId.'">';
$ret .= $pContent;