commit 18d9c6be8c0316bde79baddd1750a17bce2ba226
parent e009f56109bf851922862b6e109acacf7ca42062
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 19 Apr 2012 00:11:26 -0400
Add print and save options to reports, part 1
Diffstat:
2 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/standalone/basicViewer.xul b/chrome/content/zotero/standalone/basicViewer.xul
@@ -49,14 +49,18 @@
persist="screenX screenY width height sizemode">
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
+ <script type="application/javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
<script type="application/javascript" src="chrome://zotero/content/include.js"/>
<script type="application/javascript" src="basicViewer.js"/>
<commandset id="mainCommandSet">
<!--FILE-->
- <command id="cmd_quitApplication" oncommand="goQuitApplication();"/>
<command id="cmd_close" oncommand="window.close();"/>
+ <command id="cmd_save" oncommand="saveDocument(window.content.document);"/>
+ <command id="cmd_pageSetup" oncommand="PrintUtils.showPageSetup();"/>
+ <command id="cmd_print" oncommand="PrintUtils.print();"/>
+ <command id="cmd_quitApplication" oncommand="goQuitApplication();"/>
<!--EDIT-->
<commandset id="editMenuCommands"/>
@@ -66,6 +70,8 @@
<keyset id="mainKeyset">
<key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
+ <key id="key_print" key="&printCmd.key;" command="cmd_print" modifiers="accel"/>
+ <key id="key_save" key="&saveCmd.key;" command="cmd_save" modifiers="accel"/>
</keyset>
<keyset id="editMenuKeys"/>
@@ -110,6 +116,15 @@
<menupopup id="menu_FilePopup">
<menuitem id="menu_close" label="&closeCmd.label;" key="key_close"
accesskey="&closeCmd.accesskey;" command="cmd_close"/>
+ <menuseparator/>
+ <menuitem id="menu_save" label="&saveCmd.label;" key="key_save"
+ accesskey="&saveCmd.accesskey;" command="cmd_save"/>
+ <menuseparator/>
+ <menuitem id="menu_pageSetup" label="&pageSetupCmd.label;"
+ accesskey="&saveCmd.accesskey;" command="cmd_pageSetup"/>
+ <menuitem id="menu_print" label="&printCmd.label;" key="key_print"
+ accesskey="&printCmd.accesskey;" command="cmd_print"/>
+
</menupopup>
</menu>
diff --git a/chrome/locale/en-US/zotero/standalone.dtd b/chrome/locale/en-US/zotero/standalone.dtd
@@ -13,6 +13,14 @@
<!--FILE MENU-->
<!ENTITY fileMenu.label "File">
<!ENTITY fileMenu.accesskey "F">
+<!ENTITY saveCmd.label "Save…">
+<!ENTITY saveCmd.key "S">
+<!ENTITY saveCmd.accesskey "A">
+<!ENTITY pageSetupCmd.label "Page Setup…">
+<!ENTITY pageSetupCmd.accesskey "U">
+<!ENTITY printCmd.label "Print…">
+<!ENTITY printCmd.key "P">
+<!ENTITY printCmd.accesskey "U">
<!ENTITY closeCmd.label "Close">
<!ENTITY closeCmd.key "W">
<!ENTITY closeCmd.accesskey "C">