toolkit/components/printing/content/printPageSetup.xul

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
michael@0 2
michael@0 3 <!-- This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 - License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
michael@0 6
michael@0 7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
michael@0 8 <?xml-stylesheet href="chrome://global/skin/printPageSetup.css" type="text/css"?>
michael@0 9 <!DOCTYPE dialog SYSTEM "chrome://global/locale/printPageSetup.dtd">
michael@0 10
michael@0 11 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
michael@0 12 id="printPageSetupDialog"
michael@0 13 onload="onLoad();"
michael@0 14 ondialogaccept="return onAccept();"
michael@0 15 oncancel="return onCancel();"
michael@0 16 title="&printSetup.title;"
michael@0 17 persist="screenX screenY"
michael@0 18 screenX="24" screenY="24">
michael@0 19
michael@0 20 <script type="application/javascript" src="chrome://global/content/printPageSetup.js"/>
michael@0 21
michael@0 22 <!-- Localizable strings manipulated at run-time. -->
michael@0 23 <data id="marginUnits.inches">&marginUnits.inches;</data>
michael@0 24 <data id="marginUnits.metric">&marginUnits.metric;</data>
michael@0 25 <data id="customPrompt.title">&customPrompt.title;</data>
michael@0 26 <data id="customPrompt.prompt">&customPrompt.prompt;</data>
michael@0 27
michael@0 28 <tabbox flex="1">
michael@0 29 <tabs>
michael@0 30 <tab label="&basic.tab;"/>
michael@0 31 <tab label="&advanced.tab;"/>
michael@0 32 </tabs>
michael@0 33 <tabpanels flex="1">
michael@0 34 <vbox>
michael@0 35 <groupbox>
michael@0 36 <caption label="&formatGroup.label;"/>
michael@0 37 <vbox>
michael@0 38 <hbox align="center">
michael@0 39 <label control="orientation" value="&orientation.label;"/>
michael@0 40 <radiogroup id="orientation" oncommand="setOrientation()">
michael@0 41 <hbox align="center">
michael@0 42 <radio id="portrait"
michael@0 43 class="portrait-page"
michael@0 44 label="&portrait.label;"
michael@0 45 accesskey="&portrait.accesskey;"/>
michael@0 46 <radio id="landscape"
michael@0 47 class="landscape-page"
michael@0 48 label="&landscape.label;"
michael@0 49 accesskey="&landscape.accesskey;"/>
michael@0 50 </hbox>
michael@0 51 </radiogroup>
michael@0 52 </hbox>
michael@0 53 <separator/>
michael@0 54 <hbox align="center">
michael@0 55 <label control="scalingInput"
michael@0 56 value="&scale.label;"
michael@0 57 accesskey="&scale.accesskey;"/>
michael@0 58 <textbox id="scalingInput" size="4" oninput="checkDouble(this)"/>
michael@0 59 <label value="&scalePercent;"/>
michael@0 60 <separator/>
michael@0 61 <checkbox id="shrinkToFit"
michael@0 62 label="&shrinkToFit.label;"
michael@0 63 accesskey="&shrinkToFit.accesskey;"
michael@0 64 oncommand="gDialog.scalingInput.disabled=gDialog.scalingLabel.disabled=this.checked"/>
michael@0 65 </hbox>
michael@0 66 </vbox>
michael@0 67 </groupbox>
michael@0 68 <groupbox>
michael@0 69 <caption label="&optionsGroup.label;"/>
michael@0 70 <checkbox id="printBG"
michael@0 71 label="&printBG.label;"
michael@0 72 accesskey="&printBG.accesskey;"/>
michael@0 73 </groupbox>
michael@0 74 </vbox>
michael@0 75 <vbox>
michael@0 76 <groupbox>
michael@0 77 <caption id="marginGroup" label="&marginGroup.label;"/>
michael@0 78 <vbox>
michael@0 79 <hbox align="center">
michael@0 80 <spacer flex="1"/>
michael@0 81 <label control="topInput"
michael@0 82 value="&marginTop.label;"
michael@0 83 accesskey="&marginTop.accesskey;"/>
michael@0 84 <textbox id="topInput" size="5" oninput="changeMargin(this)"/>
michael@0 85 <!-- This invisible label (with same content as the visible one!) is used
michael@0 86 to ensure that the <textbox> is centered above the page. The same
michael@0 87 technique is deployed for the bottom/left/right input fields, below. -->
michael@0 88 <label value="&marginTop.label;" style="visibility: hidden;"/>
michael@0 89 <spacer flex="1"/>
michael@0 90 </hbox>
michael@0 91 <hbox dir="ltr">
michael@0 92 <spacer flex="1"/>
michael@0 93 <vbox>
michael@0 94 <spacer flex="1"/>
michael@0 95 <label control="leftInput"
michael@0 96 value="&marginLeft.label;"
michael@0 97 accesskey="&marginLeft.accesskey;"/>
michael@0 98 <textbox id="leftInput" size="5" oninput="changeMargin(this)"/>
michael@0 99 <label value="&marginLeft.label;" style="visibility: hidden;"/>
michael@0 100 <spacer flex="1"/>
michael@0 101 </vbox>
michael@0 102 <!-- The "margin page" draws a simulated printout page with dashed lines
michael@0 103 for the margins. The height/width style attributes of the marginTop,
michael@0 104 marginBottom, marginLeft, and marginRight elements are set by
michael@0 105 the JS code dynamically based on the user input. -->
michael@0 106 <vbox id="marginPage" style="height:29.7mm;">
michael@0 107 <box id="marginTop" style="height:0.05in;"/>
michael@0 108 <hbox flex="1" dir="ltr">
michael@0 109 <box id="marginLeft" style="width:0.025in;"/>
michael@0 110 <box style="border: 1px; border-style: dashed; border-color: gray;" flex="1"/>
michael@0 111 <box id="marginRight" style="width:0.025in;"/>
michael@0 112 </hbox>
michael@0 113 <box id="marginBottom" style="height:0.05in;"/>
michael@0 114 </vbox>
michael@0 115 <vbox>
michael@0 116 <spacer flex="1"/>
michael@0 117 <label control="rightInput"
michael@0 118 value="&marginRight.label;"
michael@0 119 accesskey="&marginRight.accesskey;"/>
michael@0 120 <textbox id="rightInput" size="5" oninput="changeMargin(this)"/>
michael@0 121 <label value="&marginRight.label;" style="visibility: hidden;"/>
michael@0 122 <spacer flex="1"/>
michael@0 123 </vbox>
michael@0 124 <spacer flex="1"/>
michael@0 125 </hbox>
michael@0 126 <hbox align="center">
michael@0 127 <spacer flex="1"/>
michael@0 128 <label control="bottomInput"
michael@0 129 value="&marginBottom.label;"
michael@0 130 accesskey="&marginBottom.accesskey;"/>
michael@0 131 <textbox id="bottomInput" size="5" oninput="changeMargin(this)"/>
michael@0 132 <label value="&marginBottom.label;" style="visibility: hidden;"/>
michael@0 133 <spacer flex="1"/>
michael@0 134 </hbox>
michael@0 135 </vbox>
michael@0 136 </groupbox>
michael@0 137 <groupbox>
michael@0 138 <caption id="headersAndFooters" label="&headerFooter.label;"/>
michael@0 139 <grid>
michael@0 140 <columns>
michael@0 141 <column/>
michael@0 142 <column/>
michael@0 143 <column/>
michael@0 144 </columns>
michael@0 145 <rows>
michael@0 146 <row dir="ltr">
michael@0 147 <menulist id="hLeftOption" oncommand="customize(this)" tooltiptext="&headerLeft.tip;">
michael@0 148 <menupopup>
michael@0 149 <menuitem value="0" label="&hfBlank;"/>
michael@0 150 <menuitem value="1" label="&hfTitle;"/>
michael@0 151 <menuitem value="2" label="&hfURL;"/>
michael@0 152 <menuitem value="3" label="&hfDateAndTime;"/>
michael@0 153 <menuitem value="4" label="&hfPage;"/>
michael@0 154 <menuitem value="5" label="&hfPageAndTotal;"/>
michael@0 155 <menuitem value="6" label="&hfCustom;"/>
michael@0 156 </menupopup>
michael@0 157 </menulist>
michael@0 158 <menulist id="hCenterOption" oncommand="customize(this)" tooltiptext="&headerCenter.tip;">
michael@0 159 <menupopup>
michael@0 160 <menuitem value="0" label="&hfBlank;"/>
michael@0 161 <menuitem value="1" label="&hfTitle;"/>
michael@0 162 <menuitem value="2" label="&hfURL;"/>
michael@0 163 <menuitem value="3" label="&hfDateAndTime;"/>
michael@0 164 <menuitem value="4" label="&hfPage;"/>
michael@0 165 <menuitem value="5" label="&hfPageAndTotal;"/>
michael@0 166 <menuitem value="6" label="&hfCustom;"/>
michael@0 167 </menupopup>
michael@0 168 </menulist>
michael@0 169 <menulist id="hRightOption" oncommand="customize(this)" tooltiptext="&headerRight.tip;">
michael@0 170 <menupopup>
michael@0 171 <menuitem value="0" label="&hfBlank;"/>
michael@0 172 <menuitem value="1" label="&hfTitle;"/>
michael@0 173 <menuitem value="2" label="&hfURL;"/>
michael@0 174 <menuitem value="3" label="&hfDateAndTime;"/>
michael@0 175 <menuitem value="4" label="&hfPage;"/>
michael@0 176 <menuitem value="5" label="&hfPageAndTotal;"/>
michael@0 177 <menuitem value="6" label="&hfCustom;"/>
michael@0 178 </menupopup>
michael@0 179 </menulist>
michael@0 180 </row>
michael@0 181 <row dir="ltr">
michael@0 182 <vbox align="center">
michael@0 183 <label value="&hfLeft.label;"/>
michael@0 184 </vbox>
michael@0 185 <vbox align="center">
michael@0 186 <label value="&hfCenter.label;"/>
michael@0 187 </vbox>
michael@0 188 <vbox align="center">
michael@0 189 <label value="&hfRight.label;"/>
michael@0 190 </vbox>
michael@0 191 </row>
michael@0 192 <row dir="ltr">
michael@0 193 <menulist id="fLeftOption" oncommand="customize(this)" tooltiptext="&footerLeft.tip;">
michael@0 194 <menupopup>
michael@0 195 <menuitem value="0" label="&hfBlank;"/>
michael@0 196 <menuitem value="1" label="&hfTitle;"/>
michael@0 197 <menuitem value="2" label="&hfURL;"/>
michael@0 198 <menuitem value="3" label="&hfDateAndTime;"/>
michael@0 199 <menuitem value="4" label="&hfPage;"/>
michael@0 200 <menuitem value="5" label="&hfPageAndTotal;"/>
michael@0 201 <menuitem value="6" label="&hfCustom;"/>
michael@0 202 </menupopup>
michael@0 203 </menulist>
michael@0 204 <menulist id="fCenterOption" oncommand="customize(this)" tooltiptext="&footerCenter.tip;">
michael@0 205 <menupopup>
michael@0 206 <menuitem value="0" label="&hfBlank;"/>
michael@0 207 <menuitem value="1" label="&hfTitle;"/>
michael@0 208 <menuitem value="2" label="&hfURL;"/>
michael@0 209 <menuitem value="3" label="&hfDateAndTime;"/>
michael@0 210 <menuitem value="4" label="&hfPage;"/>
michael@0 211 <menuitem value="5" label="&hfPageAndTotal;"/>
michael@0 212 <menuitem value="6" label="&hfCustom;"/>
michael@0 213 </menupopup>
michael@0 214 </menulist>
michael@0 215 <menulist id="fRightOption" oncommand="customize(this)" tooltiptext="&footerRight.tip;">
michael@0 216 <menupopup>
michael@0 217 <menuitem value="0" label="&hfBlank;"/>
michael@0 218 <menuitem value="1" label="&hfTitle;"/>
michael@0 219 <menuitem value="2" label="&hfURL;"/>
michael@0 220 <menuitem value="3" label="&hfDateAndTime;"/>
michael@0 221 <menuitem value="4" label="&hfPage;"/>
michael@0 222 <menuitem value="5" label="&hfPageAndTotal;"/>
michael@0 223 <menuitem value="6" label="&hfCustom;"/>
michael@0 224 </menupopup>
michael@0 225 </menulist>
michael@0 226 </row>
michael@0 227 </rows>
michael@0 228 </grid>
michael@0 229 </groupbox>
michael@0 230 </vbox>
michael@0 231 </tabpanels>
michael@0 232 </tabbox>
michael@0 233 </dialog>
michael@0 234

mercurial