toolkit/components/printing/content/printPageSetup.xul

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/printing/content/printPageSetup.xul	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,234 @@
     1.4 +<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
     1.5 +
     1.6 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
     1.9 +
    1.10 +<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    1.11 +<?xml-stylesheet href="chrome://global/skin/printPageSetup.css" type="text/css"?>
    1.12 +<!DOCTYPE dialog SYSTEM "chrome://global/locale/printPageSetup.dtd">
    1.13 +
    1.14 +<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    1.15 +  id="printPageSetupDialog"
    1.16 +  onload="onLoad();"
    1.17 +  ondialogaccept="return onAccept();"
    1.18 +  oncancel="return onCancel();"
    1.19 +  title="&printSetup.title;"
    1.20 +  persist="screenX screenY"
    1.21 +  screenX="24" screenY="24">
    1.22 +
    1.23 +  <script type="application/javascript" src="chrome://global/content/printPageSetup.js"/>
    1.24 +
    1.25 +  <!-- Localizable strings manipulated at run-time. -->
    1.26 +  <data id="marginUnits.inches">&marginUnits.inches;</data>
    1.27 +  <data id="marginUnits.metric">&marginUnits.metric;</data>
    1.28 +  <data id="customPrompt.title">&customPrompt.title;</data>
    1.29 +  <data id="customPrompt.prompt">&customPrompt.prompt;</data>
    1.30 +
    1.31 +  <tabbox flex="1">
    1.32 +    <tabs>
    1.33 +      <tab label="&basic.tab;"/>
    1.34 +      <tab label="&advanced.tab;"/>
    1.35 +    </tabs>
    1.36 +    <tabpanels flex="1">
    1.37 +      <vbox>
    1.38 +        <groupbox>
    1.39 +          <caption label="&formatGroup.label;"/>
    1.40 +          <vbox>
    1.41 +            <hbox align="center">
    1.42 +              <label control="orientation" value="&orientation.label;"/>
    1.43 +              <radiogroup id="orientation" oncommand="setOrientation()">
    1.44 +                <hbox align="center">
    1.45 +                  <radio id="portrait"
    1.46 +                         class="portrait-page"
    1.47 +                         label="&portrait.label;"
    1.48 +                         accesskey="&portrait.accesskey;"/>
    1.49 +                  <radio id="landscape"
    1.50 +                         class="landscape-page"
    1.51 +                         label="&landscape.label;"
    1.52 +                         accesskey="&landscape.accesskey;"/>
    1.53 +                </hbox>
    1.54 +              </radiogroup>
    1.55 +            </hbox>
    1.56 +            <separator/>
    1.57 +            <hbox align="center">
    1.58 +              <label control="scalingInput"
    1.59 +                     value="&scale.label;"
    1.60 +                     accesskey="&scale.accesskey;"/>
    1.61 +              <textbox id="scalingInput" size="4" oninput="checkDouble(this)"/>
    1.62 +              <label value="&scalePercent;"/>
    1.63 +              <separator/>
    1.64 +              <checkbox id="shrinkToFit"
    1.65 +                        label="&shrinkToFit.label;"
    1.66 +                        accesskey="&shrinkToFit.accesskey;"
    1.67 +                        oncommand="gDialog.scalingInput.disabled=gDialog.scalingLabel.disabled=this.checked"/>
    1.68 +            </hbox>
    1.69 +          </vbox>
    1.70 +        </groupbox>
    1.71 +        <groupbox>
    1.72 +          <caption label="&optionsGroup.label;"/>
    1.73 +          <checkbox id="printBG"
    1.74 +                    label="&printBG.label;"
    1.75 +                    accesskey="&printBG.accesskey;"/>
    1.76 +        </groupbox>
    1.77 +      </vbox>
    1.78 +      <vbox>
    1.79 +        <groupbox>
    1.80 +          <caption id="marginGroup" label="&marginGroup.label;"/>
    1.81 +          <vbox>
    1.82 +            <hbox align="center">
    1.83 +              <spacer flex="1"/>
    1.84 +              <label control="topInput"
    1.85 +                     value="&marginTop.label;"
    1.86 +                     accesskey="&marginTop.accesskey;"/>
    1.87 +              <textbox id="topInput" size="5" oninput="changeMargin(this)"/>
    1.88 +              <!-- This invisible label (with same content as the visible one!) is used
    1.89 +                   to ensure that the <textbox> is centered above the page.  The same
    1.90 +                   technique is deployed for the bottom/left/right input fields, below. -->
    1.91 +              <label value="&marginTop.label;" style="visibility: hidden;"/>
    1.92 +              <spacer flex="1"/>
    1.93 +            </hbox>
    1.94 +            <hbox dir="ltr">
    1.95 +              <spacer flex="1"/>
    1.96 +              <vbox>
    1.97 +                <spacer flex="1"/>
    1.98 +                <label control="leftInput"
    1.99 +                       value="&marginLeft.label;"
   1.100 +                       accesskey="&marginLeft.accesskey;"/>
   1.101 +                <textbox id="leftInput" size="5" oninput="changeMargin(this)"/>
   1.102 +                <label value="&marginLeft.label;" style="visibility: hidden;"/>
   1.103 +                <spacer flex="1"/>
   1.104 +              </vbox>
   1.105 +              <!-- The "margin page" draws a simulated printout page with dashed lines
   1.106 +                   for the margins.  The height/width style attributes of the marginTop,
   1.107 +                   marginBottom, marginLeft, and marginRight elements are set by
   1.108 +                   the JS code dynamically based on the user input. -->
   1.109 +              <vbox id="marginPage" style="height:29.7mm;">
   1.110 +                <box id="marginTop" style="height:0.05in;"/>
   1.111 +                <hbox flex="1" dir="ltr">
   1.112 +                  <box id="marginLeft" style="width:0.025in;"/>
   1.113 +                  <box style="border: 1px; border-style: dashed; border-color: gray;" flex="1"/>
   1.114 +                  <box id="marginRight" style="width:0.025in;"/>
   1.115 +                </hbox>
   1.116 +                <box id="marginBottom" style="height:0.05in;"/>
   1.117 +              </vbox>
   1.118 +              <vbox>
   1.119 +                <spacer flex="1"/>
   1.120 +                <label control="rightInput"
   1.121 +                       value="&marginRight.label;"
   1.122 +                       accesskey="&marginRight.accesskey;"/>
   1.123 +                <textbox id="rightInput" size="5" oninput="changeMargin(this)"/>
   1.124 +                <label value="&marginRight.label;" style="visibility: hidden;"/>
   1.125 +                <spacer flex="1"/>
   1.126 +              </vbox>
   1.127 +              <spacer flex="1"/>
   1.128 +            </hbox>
   1.129 +            <hbox align="center">
   1.130 +              <spacer flex="1"/>
   1.131 +              <label control="bottomInput"
   1.132 +                     value="&marginBottom.label;"
   1.133 +                     accesskey="&marginBottom.accesskey;"/>
   1.134 +              <textbox id="bottomInput" size="5" oninput="changeMargin(this)"/>
   1.135 +              <label value="&marginBottom.label;" style="visibility: hidden;"/>
   1.136 +              <spacer flex="1"/>
   1.137 +            </hbox>
   1.138 +          </vbox>
   1.139 +        </groupbox>
   1.140 +        <groupbox>
   1.141 +          <caption id="headersAndFooters" label="&headerFooter.label;"/>
   1.142 +          <grid>
   1.143 +            <columns>
   1.144 +              <column/>
   1.145 +              <column/>
   1.146 +              <column/>
   1.147 +            </columns>
   1.148 +            <rows>
   1.149 +              <row dir="ltr">
   1.150 +                <menulist id="hLeftOption" oncommand="customize(this)" tooltiptext="&headerLeft.tip;">
   1.151 +                  <menupopup>
   1.152 +                    <menuitem value="0" label="&hfBlank;"/>
   1.153 +                    <menuitem value="1" label="&hfTitle;"/>
   1.154 +                    <menuitem value="2" label="&hfURL;"/>
   1.155 +                    <menuitem value="3" label="&hfDateAndTime;"/>
   1.156 +                    <menuitem value="4" label="&hfPage;"/>
   1.157 +                    <menuitem value="5" label="&hfPageAndTotal;"/>
   1.158 +                    <menuitem value="6" label="&hfCustom;"/>
   1.159 +                  </menupopup>
   1.160 +                </menulist>
   1.161 +                <menulist id="hCenterOption" oncommand="customize(this)" tooltiptext="&headerCenter.tip;">
   1.162 +                  <menupopup>
   1.163 +                    <menuitem value="0" label="&hfBlank;"/>
   1.164 +                    <menuitem value="1" label="&hfTitle;"/>
   1.165 +                    <menuitem value="2" label="&hfURL;"/>
   1.166 +                    <menuitem value="3" label="&hfDateAndTime;"/>
   1.167 +                    <menuitem value="4" label="&hfPage;"/>
   1.168 +                    <menuitem value="5" label="&hfPageAndTotal;"/>
   1.169 +                    <menuitem value="6" label="&hfCustom;"/>
   1.170 +                  </menupopup>
   1.171 +                </menulist>
   1.172 +                <menulist id="hRightOption" oncommand="customize(this)" tooltiptext="&headerRight.tip;">
   1.173 +                  <menupopup>
   1.174 +                    <menuitem value="0" label="&hfBlank;"/>
   1.175 +                    <menuitem value="1" label="&hfTitle;"/>
   1.176 +                    <menuitem value="2" label="&hfURL;"/>
   1.177 +                    <menuitem value="3" label="&hfDateAndTime;"/>
   1.178 +                    <menuitem value="4" label="&hfPage;"/>
   1.179 +                    <menuitem value="5" label="&hfPageAndTotal;"/>
   1.180 +                    <menuitem value="6" label="&hfCustom;"/>
   1.181 +                  </menupopup>
   1.182 +                </menulist>
   1.183 +              </row>
   1.184 +              <row dir="ltr">
   1.185 +                <vbox align="center">
   1.186 +                  <label value="&hfLeft.label;"/>
   1.187 +                </vbox>
   1.188 +                <vbox align="center">
   1.189 +                  <label value="&hfCenter.label;"/>
   1.190 +                </vbox>
   1.191 +                <vbox align="center">
   1.192 +                  <label value="&hfRight.label;"/>
   1.193 +                </vbox>
   1.194 +              </row>
   1.195 +              <row dir="ltr">
   1.196 +                <menulist id="fLeftOption" oncommand="customize(this)" tooltiptext="&footerLeft.tip;">
   1.197 +                  <menupopup>
   1.198 +                    <menuitem value="0" label="&hfBlank;"/>
   1.199 +                    <menuitem value="1" label="&hfTitle;"/>
   1.200 +                    <menuitem value="2" label="&hfURL;"/>
   1.201 +                    <menuitem value="3" label="&hfDateAndTime;"/>
   1.202 +                    <menuitem value="4" label="&hfPage;"/>
   1.203 +                    <menuitem value="5" label="&hfPageAndTotal;"/>
   1.204 +                    <menuitem value="6" label="&hfCustom;"/>
   1.205 +                  </menupopup>
   1.206 +                </menulist>
   1.207 +                <menulist id="fCenterOption" oncommand="customize(this)" tooltiptext="&footerCenter.tip;">
   1.208 +                  <menupopup>
   1.209 +                    <menuitem value="0" label="&hfBlank;"/>
   1.210 +                    <menuitem value="1" label="&hfTitle;"/>
   1.211 +                    <menuitem value="2" label="&hfURL;"/>
   1.212 +                    <menuitem value="3" label="&hfDateAndTime;"/>
   1.213 +                    <menuitem value="4" label="&hfPage;"/>
   1.214 +                    <menuitem value="5" label="&hfPageAndTotal;"/>
   1.215 +                    <menuitem value="6" label="&hfCustom;"/>
   1.216 +                  </menupopup>
   1.217 +                </menulist>
   1.218 +                <menulist id="fRightOption" oncommand="customize(this)" tooltiptext="&footerRight.tip;">
   1.219 +                  <menupopup>
   1.220 +                    <menuitem value="0" label="&hfBlank;"/>
   1.221 +                    <menuitem value="1" label="&hfTitle;"/>
   1.222 +                    <menuitem value="2" label="&hfURL;"/>
   1.223 +                    <menuitem value="3" label="&hfDateAndTime;"/>
   1.224 +                    <menuitem value="4" label="&hfPage;"/>
   1.225 +                    <menuitem value="5" label="&hfPageAndTotal;"/>
   1.226 +                    <menuitem value="6" label="&hfCustom;"/>
   1.227 +                  </menupopup>
   1.228 +                </menulist>
   1.229 +              </row>  
   1.230 +            </rows>
   1.231 +          </grid>
   1.232 +        </groupbox>
   1.233 +      </vbox>
   1.234 +    </tabpanels>
   1.235 +  </tabbox>
   1.236 +</dialog>
   1.237 +

mercurial