Don't allow new attachments through New Item menu
This commit is contained in:
parent
498ce68577
commit
b5d379d1ed
|
@ -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']+")");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user