|
Rank: Newbie Groups: Member
Joined: 11/30/2011 Posts: 8
|
Hi,
I have a TreeView that shows a SharePoint Document Library (as per my previous post). On the TreeView I have created a ContextMenu which allows for File Uploads, New Folde Creation etc. My problem is this - I want to "grey out" or deactivate some of the options on the context menu (client-side/javascript) depending on the type of node it was clicked on in the TreeView. For instance users should only be allowed to create new folders on existing folders and only files will have let's say the "Share With.." functionality.
When building up the treeview I capture the Url of the file/folder in the myNode.Value attribute. Is there a way to access the node on which the context menu was clicked in javascript and if so how can I then access the value attribute in order to determine the "type" of the node.
I would really appreciate some help on this
Kind Regards Jéan
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, Please go over this sample first: http://demo.essentialobjects.com/Demos/TreeView/Features/Context%20Menu/Demo.aspxYou will also need to go over this topic if you are not already familiar with our client side API: http://www.essentialobjects.com/doc/1/clientapi_howto.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 11/30/2011 Posts: 8
|
Hi
I understand both the above - I know where to do the customization my question is how can I deactivate a specific menu item on the context menu. I don't want to have to create it every time the user clicks. I want to create the menu with a set number of options but users will only be able to actually use/click/select those parts I want them to have access to. So in essence is there a way to deactivate a specific menu item in the ShowContextMenu function and if so could you please tell me how
Regards
*EDIT* I've messed around a bit and found the setDisabled property of the Navigation Item - it seems to be what I was looking for thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Yes. setDisabled is what you are looking for. Thanks for the update!
|
|