I got stuck on this, basically what I need is a way to auto expand category tree node that contains a sub category node checked.
The entry point in the code is js/extjs/ext-tree-checkbox.js and 'catalog/category/tree.phtml'
It is possible to a expand a node in with expand() js method and it is no difficult to expand all node but this slow down the page too much.
Update:
I have tested the following solution:
-
Change
js/extjs/ext-tree-checkbox.jsrender method adding this:var tree = n.getOwnerTree(); if (tree){ expandNodeIds = tree.expandNodeIds.split(','); for (i in expandNodeIds) { if (n.id == expandNodeIds[i]) n.expand(); } }
This solution works but It breaks ( it is not displayed anymore ) the tree for permission Role
This fix all the problem
Add the above code in
rendermethod ofjs/extjs/ext-tree-checkbox.js