Skip to content

Commit 80b0c5b

Browse files
committed
AC-107: Update Third Party library: jstree
- fix CR notes
1 parent 6391aa7 commit 80b0c5b

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/category-tree.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,7 @@ define([
3333
options.tree,
3434
{
3535
core: {
36-
data: {
37-
url: options.url,
38-
type: 'POST',
39-
dataFilter: $.proxy(function (data) {
40-
return this._convertDataNodes(JSON.parse(data));
41-
}, this),
42-
43-
/**
44-
* @param {HTMLElement} node
45-
* @return {Object}
46-
*/
47-
data: function (node) {
48-
return {
49-
id: node.id === '#' ? null : node.id,
50-
'form_key': window.FORM_KEY
51-
};
52-
}
53-
}
36+
data: this._convertData(this.options.data).children
5437
}
5538
}
5639
);

app/code/Magento/Cms/Block/Adminhtml/Wysiwyg/Images/Tree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function getTreeJson()
7878
];
7979
$hasNestedDirectories = $this->hasNestedDirectories($storageRoot, $item->getFilename());
8080

81-
// if no nested directories inside dir, add 'leaf' state so that jstree hides dropdown arrow next to dir
81+
// Display node as closed and enable lazy loading
8282
if ($hasNestedDirectories) {
8383
$data['children'] = true;
8484
}

0 commit comments

Comments
 (0)