If you are writing client side JavaScript code to interact with the SharePoint menus you will need to know the IDs of the <ie:menuitem> tags. Below are several tables with some of the IDs used by menu items. Remember that in the SharePoint page these will include a prefix that might look like "zz22_" or “ct100_”.
If the ID you need is not listed here then view the source of your SharePoint page and search for the name of the menu item (“Edit Page”) or the text "ie:menuitem" until you find the one you need.
You would then find the menu item using JavaScript or jQuery routines such as the examples below:
JavaScript:
<script type="text/javascript"> var doc = document.getElementsByTagName('ie:menuitem'); for (var i = 0; i < doc.length; i++) { itm = doc[i]; if (itm.id.match('OpenInExplorer') != null) { itm.hidden=true; break; } } </script>
jQuery:
$('ie\\:menuitem[id*=OpenInExplorer]').attr("hidden","true")
The is a list of items created in a typical WSS Master Page:
Menu ID name |
Menu |
Menu text |
PersonalInformation |
The Welcome menu |
My Settings |
LoginAsDifferentUser |
The Welcome menu |
Sign in as Different User |
RequestAccess |
The Welcome menu |
Request Access |
Logout |
The Welcome menu |
Sign Out |
MenuItem_Create |
Site Actions |
Create |
MenuItem_Settings |
Site Actions |
Site Settings |
MenuIItem_EditPage | Site Actions | Edit Page |
This is a list of items created by a typical document library allitems.aspx page:
(all of the above table plus the following)
Menu ID name |
Menu |
Menu text |
New0 (zero, not O) |
New |
New Document (default click) |
NewFolder |
New |
New Folder |
_Upload (1) |
Upload |
Upload Document |
MultipleUpload |
Upload |
Upload Multiple Documents |
EditInGridButton |
Actions |
Edit in Datasheet |
OpenInExplorer |
Actions |
Open with Windows Explorer |
OfflineButton |
Actions |
Connect to Outlook |
ExportToSpreadsheet |
Actions |
Export to Spreadsheet |
ViewRSS |
Actions |
View RSS Feed |
SubscribeButton |
Actions |
Alert Me |
AddColumn |
Settings |
Create Column |
AddView |
Settings |
Create View |
ListSettings |
Settings |
Document Library Settings |
DefaultView |
View |
All Documents (in typical library) |
View1 |
View |
Explorer View |
ModifyView |
View |
Modify this view |
CreateView |
View |
Create view |
(1) Prefix the keyword "Upload" with the underline to not confuse with "MultipleUpload"
Unique to a Picture Library
Menu ID name |
Menu |
Menu text |
EditPictures |
Actions |
Edit |
DeletePictures |
Actions |
Delete |
DownloadPictures |
Actions |
Download |
SendPictures |
Actions |
Send To |
ViewSlideShow |
Actions |
View Slide Show |
Lists
Menu ID name |
Menu |
Menu text |
EditInGridButton |
Actions |
Edit in Datasheet |
ExportToDatabase |
Actions |
Open with Access |
.
No comments:
Post a Comment