// Add id attribute to tree header button
This commit is contained in:
1 parent
8f08f67812
commit
6e2337df44
2 files changed
+9
-8
No files matched your search
@@ -22,7 +22,7 @@
|
|||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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}
|
{if isset($icon_class)}<i class="{$icon_class}"></i>{/if}
|
||||||
{l s=$label}
|
{l s=$label}
|
||||||
</a>
|
</a>
|
||||||
@@ -228,19 +228,20 @@ class HelperTreeCategoriesCore extends TreeCore
|
|||||||
|
|
||||||
if ($this->useCheckBox())
|
if ($this->useCheckBox())
|
||||||
{
|
{
|
||||||
$this->addAction(new TreeToolbarLink(
|
$checkAll = new TreeToolbarLink(
|
||||||
'Check All',
|
'Check All',
|
||||||
'#',
|
'#',
|
||||||
'checkAllAssociatedCategories($(\'#'.$this->getId().'\'));',
|
'checkAllAssociatedCategories($(\'#'.$this->getId().'\'));',
|
||||||
'icon-check-sign')
|
'icon-check-sign');
|
||||||
);
|
$checkAll->setAttribute('id', 'check-all-'.$this->getId());
|
||||||
$this->addAction(new TreeToolbarLink(
|
$unCheckAll = new TreeToolbarLink(
|
||||||
'Uncheck All',
|
'Uncheck All',
|
||||||
'#',
|
'#',
|
||||||
'uncheckAllAssociatedCategories($(\'#'.$this->getId().'\'));',
|
'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->setNodeFolderTemplate('tree_node_folder_checkbox.tpl');
|
||||||
$this->setNodeItemTemplate('tree_node_item_checkbox.tpl');
|
$this->setNodeItemTemplate('tree_node_item_checkbox.tpl');
|
||||||
$this->setAttribute('use_checkbox', $this->useCheckBox());
|
$this->setAttribute('use_checkbox', $this->useCheckBox());
|
||||||
|
|||||||
Reference in new issue
Block a user