I faced a situation where I need to remove the Send To menu item from the ECB menu. I binged (Search using Bing) and found lot of blog post to remove the items from the ECB. Most of them are suggesting to have a copy of Core.js and remove the menu items in the new version of renamed core.js file. Refer the new copied version of core.js in the master page.
I found another way of doing this by adding the below line of script to a content editor web part in the item list page or in master page.
function AddSendSubMenu(m,ctx){ return false;}
public override void ItemDeleting(SPItemEventProperties properties)
ReplyDelete{
if (properties.ListItemId == 0)
{
using (SPWeb web = properties.OpenWeb())
{
SPList list = web.Lists[properties.ListId];
if (list.ItemCount!=0)
{
properties.Cancel = true;
properties.ErrorMessage = "Library not empty";
}
}
}
}
function Custom_AddDocLibMenuItems(m, ctx)
ReplyDelete{
var strDisplayText = "Say Hello rjesh!";
var strAction = "alert('Hello Rjesh')";
var strImagePath = "";
// Add our new menu item
CAMOpt(m, strDisplayText, strAction, strImagePath);
// add a separator to the menu
CAMSep(m);
return false;
}
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
ReplyDeletehttp://www.hanselman.com/blog/CommentView.aspx?guid=91da8c0a-537e-4bbf-abac-c6652dee7057
http://cheeso.members.winisp.net/IirfHelp/frames.htm
Hi Rajesh,
ReplyDeletePlease help me as i want to hide "check in" option from edit properties, this is when we upload the document to the library and if you make any one of the columns make it "Required column". we will get check in button in edit properties. this check in option i want to hide(while uploading only). Please help me sir. please provide me JAVASCRIPT not c# code as i do not have access to VS2010.