From fa7ca7e2d772270cb3b02e486aa14a9f6f6468c9 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sat, 2 Jul 2011 03:09:13 +0000 Subject: [PATCH] Improve standalone menus --- chrome/content/zotero/standalone.js | 52 +++++++++++++++++++ chrome/content/zotero/standalone.xul | 22 +++++++- chrome/content/zotero/zoteroPane.xul | 23 +++++--- .../en-US/zotero/standalone/standalone.dtd | 4 ++ chrome/locale/en-US/zotero/zotero.dtd | 2 + 5 files changed, 93 insertions(+), 10 deletions(-) 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 @@ - +