mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-01-27 14:28:30 +00:00
Merge pull request #21 from smz/ToggleIconPlusMinus
Toggle icon Plus/Minus when expanding/collapsing
This commit is contained in:
commit
f538f057be
@ -11,6 +11,18 @@ defined('_JEXEC') or die;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
|
||||
JHtml::_('behavior.caption');
|
||||
|
||||
JFactory::getDocument()->addScriptDeclaration("
|
||||
jQuery(function($) {
|
||||
$('.categories-list').find('[id^=category-btn-]').each(function(index, btn) {
|
||||
var btn = $(btn);
|
||||
btn.on('click', function() {
|
||||
btn.find('span').toggleClass('icon-plus');
|
||||
btn.find('span').toggleClass('icon-minus');
|
||||
});
|
||||
});
|
||||
});");
|
||||
|
||||
echo JLayoutHelper::render('joomla.content.categories_default', $this);
|
||||
echo $this->loadTemplate('items');
|
||||
?>
|
||||
|
@ -34,7 +34,8 @@ if (count($this->items[$this->parent->id]) > 0 && $this->maxLevelcat != 0) :
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
|
||||
<a href="#category-<?php echo $item->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<a id="category-btn-<?php echo $item->id;?>" href="#category-<?php echo $item->id;?>"
|
||||
data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
|
||||
<?php endif;?>
|
||||
</h3>
|
||||
<?php if ($this->params->get('show_subcat_desc_cat') == 1) :?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user