Don't allow new attachments through New Item menu

This commit is contained in:
Dan Stillman 2006-08-31 22:45:14 +00:00
parent 498ce68577
commit b5d379d1ed

View File

@ -87,6 +87,11 @@ var ScholarPane = new function()
var itemTypes = Scholar.ItemTypes.getTypes(); var itemTypes = Scholar.ItemTypes.getTypes();
for(var i = 0; i<itemTypes.length; i++) for(var i = 0; i<itemTypes.length; i++)
{ {
// Don't allow new attachments through this menu
if (itemTypes[i]['name']=='attachment')
{
continue;
}
var menuitem = document.createElement("menuitem"); var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", Scholar.getString("itemTypes."+itemTypes[i]['name'])); menuitem.setAttribute("label", Scholar.getString("itemTypes."+itemTypes[i]['name']));
menuitem.setAttribute("oncommand","ScholarPane.newItem("+itemTypes[i]['id']+")"); menuitem.setAttribute("oncommand","ScholarPane.newItem("+itemTypes[i]['id']+")");