www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit bacd25633b34897f314a323a59d272678a371609
parent 1dca17c96bd1c3baf8b771b4add088c1df1d9d88
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu,  2 Aug 2012 16:59:28 -0400

Fix error updating types menu after installation of NSF item type

Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 2+-
Mchrome/content/zotero/zoteroPane.js | 4++++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -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(); } } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -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 = [];