// Add id attribute to tree header button
This commit is contained in:
@@ -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>
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user