One of my friend and colleague asked me this question. I found it tricky and a good post for my blog. Here's what we have to do:
Go to your hive\template\layouts\1033 folder. Open up the Core.js file. Find the function Addsendsubmenu. Go to the last 3 lines:
"Stsnavigate ('""/_layouts/download.aspx?" ) "Sourceurl=" "&source=" "&fldurl=" " ')""" ""id_downloadacopy";
Now if you want to remove "Download a Copy" option from the document libraries then comment all three lines.
If you want to remove it for some custom List Definition so you have the created you could do like:
if (ctx.listtemplate!=10001) {straction = "S Tsnavigate (' " + CTX. Httproot + "/_layouts/download.aspx?" + "sourceurl=" + Currentitemescapedfileurl + "&source=" + getsource () + "&fldurl=" + escapeproperly (ctx. Sendtolocationurl) + ;; Menuoption = camopt (SM, L_downloadacopy_text, straction, ); Menuoption.id = "id_downloadacopy" ;}
Where 10001 was your The custom list template ID.
If you want to does it for a specific the Document Library then you would does like this:
if (ctx.listname!= "{ 28958b49-8c76-4987-815c-cf5a107ff522} "" {straction = "stsnavigate ('" + CTX.) Httproot + "/_layouts/download.aspx?" + "sourceurl=" + Currentitemescapedfileurl + "&source=" + getsource () + "&fldurl=" + escapeproperly (ctx. Sendtolocationurl) + ;; Menuoption = camopt (SM, L_downloadacopy_text, straction, ); Menuoption.id = "id_downloadacopy" ;}
As you can see you has to pass the list GUID as ListName.
SharePoint MOSS/WSS-How to remove the "Download a Copy" context menu from a Document Library