Fix error updating types menu after installation of NSF item type

This commit is contained in:
Dan Stillman 2012-08-02 16:59:28 -04:00
parent 1dca17c96b
commit bacd25633b
2 changed files with 5 additions and 1 deletions

View file

@ -380,7 +380,7 @@ Zotero.Schema = new function(){
var enumerator = wm.getEnumerator("navigator:browser");
while (enumerator.hasMoreElements()) {
var win = enumerator.getNext();
win.ZoteroPane.buildItemTypeMenus();
win.ZoteroPane.buildItemTypeSubMenu();
win.document.getElementById('zotero-editpane-item-box').buildItemTypeMenu();
}
}

View file

@ -256,6 +256,10 @@ var ZoteroPane = new function()
this.buildItemTypeSubMenu = function () {
var moreMenu = document.getElementById('zotero-tb-add-more');
while (moreMenu.hasChildNodes()) {
moreMenu.removeChild(moreMenu.firstChild);
}
// Sort by localized name
var t = Zotero.ItemTypes.getSecondaryTypes();
var itemTypes = [];