summaryrefslogtreecommitdiff
path: root/smartyplugins/block.jstab.php
diff options
context:
space:
mode:
authorTim UX <tim@presto>2018-03-19 16:41:08 -0400
committerTim UX <tim@presto>2018-03-19 16:41:08 -0400
commit81c3b08a36d329c60a4a88f60c6ff2f0686be18a (patch)
treeda2a687baa2d8457548534079c79a78f6ab7ca81 /smartyplugins/block.jstab.php
parent525ddb79173caa12b762c2f977bd011be4a679fc (diff)
downloadthemes-81c3b08a36d329c60a4a88f60c6ff2f0686be18a.tar.gz
themes-81c3b08a36d329c60a4a88f60c6ff2f0686be18a.tar.bz2
themes-81c3b08a36d329c60a4a88f60c6ff2f0686be18a.zip
add type to jstabs to allow pills or tabs (default)
Diffstat (limited to 'smartyplugins/block.jstab.php')
-rw-r--r--smartyplugins/block.jstab.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/smartyplugins/block.jstab.php b/smartyplugins/block.jstab.php
index 44b8a9c..e88b50a 100644
--- a/smartyplugins/block.jstab.php
+++ b/smartyplugins/block.jstab.php
@@ -25,14 +25,16 @@ function smarty_block_jstab( $pParams, $pContent, &$gBitSmarty, $pRepeat ) {
$tabId = strtolower( isset( $pParams['id'] ) ? $pParams['id'] : 'tab'.preg_replace("/[^A-Za-z0-9]/", '', $tTitle) );
- $tabString = '<li '.$tClick.' '.$tClass.' '.$tStyle.'><a href="#'.$tabId.'" data-toggle="tab">' . htmlspecialchars( $tTitle ) . '</a></li>';
+ $tabString = '<li '.$tClick.' '.$tClass.' '.$tStyle.'><a href="#'.$tabId.'" data-toggle="'.$type.'">' . htmlspecialchars( $tTitle ) . '</a></li>';
if( isset( $pParams['position'] ) ) {
array_splice( $jsTabLinks, $pParams['position'], 0, $tabString );
} else {
$jsTabLinks[] = $tabString;
}
- $ret = '<div class="tab-pane" id="'.$tabId.'">';
+ $type = BitBase::getParameter( $pParams, 'type', 'tabs' );
+
+ $ret = '<div class="'.$type.'-pane" id="'.$tabId.'">';
$ret .= $pContent;
$ret .= '</div>';