zenox
8 Aug 2007, 1:52 PM
Hey,
Here is an issue I noticed and figured I would report:
I have a tree with a context menu. Depending on which node is chosen I disable/enable certain nodes. The code was like this:
myTree.on ( 'contextmenu', function (node) {node.select();toggleMenu(node.directory);contextMenu.show(node.ui.getEl());}, this );
Where my tree is 'myTree' my context menu is 'contextMenu'
This was my origional toggleMenu function
toggleMenu:function(dir){
ndMenu.disabled = !dir;
nfMenu.disabled = !dir;
}
Now with this code, my menu items css was not changing properly. The items would stay disabled.
I changed the function to be this:
toggleMenu:function(dir){
if ( !dir ){
ndMenu.disable();
nfMenu.disable();}
else{
ndMenu.enable();
nfMenu.enable();
}
And everything is working properly. Hopefully this post will help someone out in the future.
If you have any questions feel free to ask away.
Here is an issue I noticed and figured I would report:
I have a tree with a context menu. Depending on which node is chosen I disable/enable certain nodes. The code was like this:
myTree.on ( 'contextmenu', function (node) {node.select();toggleMenu(node.directory);contextMenu.show(node.ui.getEl());}, this );
Where my tree is 'myTree' my context menu is 'contextMenu'
This was my origional toggleMenu function
toggleMenu:function(dir){
ndMenu.disabled = !dir;
nfMenu.disabled = !dir;
}
Now with this code, my menu items css was not changing properly. The items would stay disabled.
I changed the function to be this:
toggleMenu:function(dir){
if ( !dir ){
ndMenu.disable();
nfMenu.disable();}
else{
ndMenu.enable();
nfMenu.enable();
}
And everything is working properly. Hopefully this post will help someone out in the future.
If you have any questions feel free to ask away.