File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
app/code/Magento/Catalog/view/adminhtml/templates/catalog/category/widget Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ $scriptString .= <<<script
77
77
dataUrl: ' {$ block ->escapeJs ($ block ->escapeUrl ($ block ->getLoadTreeUrl ()))}'
78
78
});
79
79
80
+ categoryLoader.processResponse = function (response, parent, callback) {
81
+ var config = JSON.parse(response.responseText);
82
+
83
+ this.buildCategoryTree(parent, config);
84
+
85
+ if (typeof callback == "function") {
86
+ callback(this, parent);
87
+ }
88
+ };
89
+
80
90
categoryLoader.buildCategoryTree = function(parent, config)
81
91
{
82
92
if (!config) return null;
@@ -164,8 +174,10 @@ $scriptString .= <<<script
164
174
};
165
175
166
176
categoryLoader.on("beforeload", function(treeLoader, node) {
167
- $(' {$ block ->escapeJs ($ _divId )}').fire('category:beforeLoad', {treeLoader:treeLoader});
168
177
treeLoader.baseParams.id = node.attributes.id;
178
+ treeLoader.baseParams.store = node.attributes.store;
179
+ treeLoader.baseParams.form_key = FORM_KEY;
180
+ $(' {$ block ->escapeJs ($ _divId )}').fire('category:beforeLoad', {treeLoader:treeLoader});
169
181
});
170
182
171
183
tree {$ block ->escapeJs ($ block ->getId ())} = new Ext.tree.TreePanel.Enhanced(' {$ block ->escapeJs ($ _divId )}', {
You can’t perform that action at this time.
0 commit comments