In my environment, I do not want to show users the Site Actions menu options that allow them to sync to workspace or click on Edit in SharePoint Designer.
I created this script that would iterate the menu options and hide the ones I didnt want available
I created this script that would iterate the menu options and hide the ones I didnt want available
ExecuteOrDelayUntilScriptLoaded(HideSiteActionMenuItems, "SP.Ribbon.js");
function HideSiteActionMenuItems()
{
var menuItems = document.getElementsByTagName("ie:menuitem");
if( menuItems != null )
{
for( var i = 0; i < menuItems.length; i++ )
{
var keyId = menuItems[i].id;
if(keyId.endsWith("MenuItem_TakeOffline"))//Hide Sync to SharePoint Workspace
menuItems[keyId ].hidden = true;
else if( keyId.endsWith("MenuItem_EditSite")) //Hide Edit in SharePoint Designer
menuItems[keyId].hidden = true;
}
}
}