Let’s face it, the SharePoint ECB menu contains lots of items that may not be required for a simple system.
It is possible by creating a custom version of the CORE.JS file to hide any required menu items from the ECB drop-down menu – betware though this will hide it for the entire site collection.
Let’s say we want to hide the ‘Check Out’ option:
Make a copy of the CORE.JS file from the following location on the SharePoint Server:
Name this copy CUSTOMCORE.JS. Next open this file with SharePoint Designer or a standard text editor, find and comment out the following line:
AddCheckinCheckoutMenuItem(m, ctx, currentItemEscapedFileUrl);
Save the file and now open your master page (normally default.master). You will probably need to do this with SharePoint designer, add the following line to the head of the page:
Save the masterpage and head over to your SharePoint site, you should now see that the ECB menu is missing the ‘Check Out’ option:
You can do this with each of the menu items that you need to hide, simply comment out the ‘Add’ code for the menu item – e.g. The workflows method is AddWorkflowsMenuItem.
Hope this helps some one!
If you want to hide the Check Out menu item from All users you will need to publish a Major version of the master page in the ‘Masterpage Gallery’ of the site. Simply click edit properties (because we can no longer check out using the menu! – unless you sign in as a different user of course), check out then check back in. You will then get the option to publish a major version, once this has been approved it will be available to all users.