Add print and save options to reports, part 1

This commit is contained in:
Simon Kornblith 2012-04-19 00:11:26 -04:00
parent e009f56109
commit 18d9c6be8c
2 changed files with 24 additions and 1 deletions

View file

@ -49,14 +49,18 @@
persist="screenX screenY width height sizemode"> persist="screenX screenY width height sizemode">
<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/> <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/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://global/content/inlineSpellCheckUI.js"/>
<script type="application/javascript" src="chrome://zotero/content/include.js"/> <script type="application/javascript" src="chrome://zotero/content/include.js"/>
<script type="application/javascript" src="basicViewer.js"/> <script type="application/javascript" src="basicViewer.js"/>
<commandset id="mainCommandSet"> <commandset id="mainCommandSet">
<!--FILE--> <!--FILE-->
<command id="cmd_quitApplication" oncommand="goQuitApplication();"/>
<command id="cmd_close" oncommand="window.close();"/> <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--> <!--EDIT-->
<commandset id="editMenuCommands"/> <commandset id="editMenuCommands"/>
@ -66,6 +70,8 @@
<keyset id="mainKeyset"> <keyset id="mainKeyset">
<key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/> <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>
<keyset id="editMenuKeys"/> <keyset id="editMenuKeys"/>
@ -110,6 +116,15 @@
<menupopup id="menu_FilePopup"> <menupopup id="menu_FilePopup">
<menuitem id="menu_close" label="&closeCmd.label;" key="key_close" <menuitem id="menu_close" label="&closeCmd.label;" key="key_close"
accesskey="&closeCmd.accesskey;" command="cmd_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> </menupopup>
</menu> </menu>

View file

@ -13,6 +13,14 @@
<!--FILE MENU--> <!--FILE MENU-->
<!ENTITY fileMenu.label "File"> <!ENTITY fileMenu.label "File">
<!ENTITY fileMenu.accesskey "F"> <!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.label "Close">
<!ENTITY closeCmd.key "W"> <!ENTITY closeCmd.key "W">
<!ENTITY closeCmd.accesskey "C"> <!ENTITY closeCmd.accesskey "C">