diff --git a/chrome/content/zotero/standalone.js b/chrome/content/zotero/standalone.js index 9873b3a26..76b035536 100644 --- a/chrome/content/zotero/standalone.js +++ b/chrome/content/zotero/standalone.js @@ -30,6 +30,9 @@ Components.utils.import("resource://gre/modules/Services.jsm"); */ var ZoteroStandalone = new function() { + /** + * Run when standalone window first opens + */ this.onLoad = function() { if(!Zotero || !Zotero.initialized) { ZoteroPane.displayStartupError(); @@ -53,6 +56,52 @@ var ZoteroStandalone = new function() } + /** + * Builds new item menu + */ + this.buildNewItemMenu = function() { + var addMenu = document.getElementById('menu_NewItemPopup'); + + // Remove all nodes so we can regenerate + while(addMenu.hasChildNodes()) addMenu.removeChild(addMenu.firstChild); + + var typeSets = [Zotero.ItemTypes.getPrimaryTypes(), Zotero.ItemTypes.getSecondaryTypes()]; + for(var i in typeSets) { + var t = typeSets[i]; + + // Sort by localized name + var itemTypes = []; + for (var i=0; i + + + + + + @@ -131,9 +140,9 @@ key="key_copy" accesskey="©Cmd.accesskey;" command="cmd_copy"/> + command="cmd_zotero_copyCitation"/> + command="cmd_zotero_copyBibliography"/> @@ -153,6 +162,15 @@ + + + + + + + + + + + + + + @@ -86,7 +93,7 @@ - + @@ -94,11 +101,11 @@ - +