The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Group/List view Right Click menu
Posted: 29 Jul 10 7:29 AM
|
Hi All, Does anyone know how you go about disabling certain options in the menu when you right click on a list view/ group tab. (Add Group, Manage Groups, Edit, Copy etc.)
In LAN this would usually be something id do through Function Security in Admnistrator but that doesnt seem to apply to web.
Thanks all. |
|
|
|
Re: Group/List view Right Click menu
Posted: 29 Jul 10 8:28 AM
|
Forgot to mention i dont want to hide the menu altogether, but rather restrict the menu items depending on who the logged in user is. |
|
|
|
Re: Group/List view Right Click menu
Posted: 29 Jul 10 8:56 AM
|
Just realised that the right click menu on the group tab isnt the only place you can get to these menu options. You can also use the 'Groups' button found at the top right of the screen and also right click highlighted list items and choose 'save records as group'........*sigh* |
|
|
|
Re: Group/List view Right Click menu
Posted: 29 Jul 10 10:30 AM
|
I believe as of SP3 you can do all this with feature security. SP3 is due out soon. Either wait until then and upgrade (you will want to upgrade when you see the new features), or edit the js files that all this stuff sits in.
This one is not for the faint hearted though as you have to tinker with a lot of the core slx js files, and upgrades (hotfixes and sps) are a nightmare to manage.
I have done it - it is possible. If you still feel you want to go down that road let me know and I can tell you where to start. |
|
|
|
Re: Group/List view Right Click menu
Posted: 29 Jul 10 10:44 AM
|
Thanks Nick sounds good, id be happy to wait for SP3 but ill see what is wanted and i may be getting back to you
Cheers. |
|
|
|
Re: Group/List view Right Click menu
Posted: 05 Aug 10 1:34 PM
|
Hi Andrew, you can get to this functionality, it is in a javascript function that is compiled into the site during deployment. The script/function you want is in:
(Model)/Portal Manager/Sage Salelogix/SupportFiles/jscript/sage-common/baselayout.js
the function is called 'checkMenuItemAvailability' and is called for both the right click menu and the groups dropdown menu...
Each of the Items is referenced by its name e.g 'contextCopy' (right click menu item(s) on group tab) or 'navItemCopy' menu from group button/menu dropdown. Others are 'contextShare', 'contextEdit', 'contextHide' and 'navItemShare', 'navItemEdit', 'navItemHide' and so on...
You have access to the clientside services here too so hiding items based on some of the user values is possible, as is doing something depending on who created the group. I wanted to disable all options for Admin created groups containing sensitive financial values from a table that was invisible in the web client (no joins), so I changed the first letter of the pluginid for the secured groups to a 'z' (normally p), then tested for this in the javascript using:
if ((menu.items.items[i].id == 'contextShare') || (menu.items.items[i].id == 'navItemShare')) { if (grpInfo.userID != userID && groupID.substring(0,1)=='z') { menu.items.items[i].disable(); } } Obviously, the function contains more, but you'll get the idea I think and can modify your own script to whatever spec you like 
Gary |
|
|
|