I have created a GUI extension and added it to both Ribbon bar and Context menu.
Extension is working, but disabling it when "inappropriate" item is selected is creating a challenge.
I have set isEnabled (in the .js) to return false when publication/folder is selected. This is working nicely in the main view, but not in the tree view.
In the tree view, for Context menu it is working (extension is grayed out), but it is not working for Ribbon button. Button is always enabled (although when you click it while "inappropriate" item is selected it doesn't do anything).
How do I set enabled/disabled status for Ribbon button when items in tree view are selected?