// Add id attribute to tree header button

This commit is contained in:
Jerome Nadaud
2013-09-24 12:27:51 +02:00
parent 8f08f67812
commit 6e2337df44
2 changed files with 9 additions and 8 deletions
@@ -22,7 +22,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<a href="{$link}"{if isset($action)}onclick="{$action}"{/if} class="btn btn-default btn-sm">
<a href="{$link}"{if isset($action)}onclick="{$action}"{/if}{if isset($id)} id="{$id}"{/if} class="btn btn-default btn-sm">
{if isset($icon_class)}<i class="{$icon_class}"></i>{/if}
{l s=$label}
</a>
+8 -7
View File
@@ -228,19 +228,20 @@ class HelperTreeCategoriesCore extends TreeCore
if ($this->useCheckBox())
{
$this->addAction(new TreeToolbarLink(
$checkAll = new TreeToolbarLink(
'Check All',
'#',
'checkAllAssociatedCategories($(\'#'.$this->getId().'\'));',
'icon-check-sign')
);
$this->addAction(new TreeToolbarLink(
'icon-check-sign');
$checkAll->setAttribute('id', 'check-all-'.$this->getId());
$unCheckAll = new TreeToolbarLink(
'Uncheck All',
'#',
'uncheckAllAssociatedCategories($(\'#'.$this->getId().'\'));',
'icon-check-empty')
);
'icon-check-empty');
$unCheckAll->setAttribute('id', 'uncheck-all-'.$this->getId());
$this->addAction($checkAll);
$this->addAction($unCheckAll);
$this->setNodeFolderTemplate('tree_node_folder_checkbox.tpl');
$this->setNodeItemTemplate('tree_node_item_checkbox.tpl');
$this->setAttribute('use_checkbox', $this->useCheckBox());