- getRoot()):?>
+
= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
'onclick',
- 'tree.collapseTree(); event.preventDefault();',
+ 'TreeConfig.collapseAll(); event.preventDefault();',
'#colapseAll'
) ?>
= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
'onclick',
- 'tree.expandTree();event.preventDefault();',
+ 'TreeConfig.expandAll();event.preventDefault();',
'#expandAll'
) ?>
-
-
-
-
= $block->escapeHtml(__('This operation can take a long time')) ?>
-
+
+
+
= $block->escapeHtml(__('This operation can take a long time')) ?>
+
+
= /* @noEscape */ $secureRenderer->renderStyleAsTag(
'display: none;',
'div[data-id="information-dialog-tree"]'
) ?>
-
'; ?>
- if (this.storeId != 0 && $('add_root_category_button')) {
- $('add_root_category_button').hide();
- }
+ getCategoryId() . ',
+
+ defaultParams = {
+ text: ' . /* @noEscape */ json_encode(htmlentities($root->getName())) . ',
+ allowDrop: ' . ($root->getIsVisible() ? 'true' : 'false') . ',
+ id: ' . (int)$root->getId() . ',
+ expanded: ' . (int)$block->getIsWasExpanded() . ',
+ store_id: ' . (int)$block->getStore()->getId() . ',
+ category_id: ' . (int)$block->getCategoryId() . ',
+ parent: ' . (int)$block->getRequest()->getParam('parent') . '
+ };' . PHP_EOL;
- if (firstLoad) {
- this.addListener('click', this.categoryClick);
- this.addListener('beforenodedrop', categoryMove.bind(this));
+ $scriptString .= <<