File: EdTableProps.xul

package info (click to toggle)
mozilla-firefox 1.0.4-2sarge17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 255,356 kB
  • ctags: 267,207
  • sloc: cpp: 1,623,961; ansic: 792,828; xml: 85,380; makefile: 41,934; perl: 27,802; asm: 14,884; sh: 14,807; cs: 4,507; python: 4,398; java: 4,004; yacc: 1,380; lex: 409; pascal: 354; php: 244; csh: 132; objc: 73; ada: 44; sql: 4
file content (271 lines) | stat: -rw-r--r-- 12,867 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0"?>

<!--
   - The contents of this file are subject to the Netscape Public
   - License Version 1.1 (the "License"); you may not use this file
   - except in compliance with the License. You may obtain a copy of
   - the License at http://www.mozilla.org/NPL/
   -  
   - Software distributed under the License is distributed on an "AS
   - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   - implied. See the License for the specific language governing
   - rights and limitations under the License.
   -  
   - The Original Code is Mozilla Communicator client code, released
   - March 31, 1998.
   - 
   - The Initial Developer of the Original Code is Netscape
   - Communications Corporation. Portions created by Netscape are
   - Copyright (C) 1998-1999 Netscape Communications Corporation. All
   - Rights Reserved.
   - 
   - Contributor(s): 
   -    Ben Goodger
  -->

<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>

<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?> 

<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">

<dialog title="&tableWindow.title;"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    onload="Startup()"
    buttons="accept,extra1,cancel,help"
    ondialogaccept="return onAccept();"
    ondialogextra1="return Apply();"
    ondialogcancel="return onCancel();"
    ondialoghelp="return doHelpButton();">

  <!-- Methods common to all editor dialogs -->
  <script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
  <script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
  <script type="application/x-javascript" src="chrome://editor/content/EdTableProps.js"/>
  <script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>

  <spacer id="location" offsetY="50" persist="offsetX offsetY"/>
  <broadcaster id="args" value=""/>

  <tabbox id="TabBox">
    <tabs flex="1">
      <tab id="TableTab" label="&tableTab.label;"/>
      <tab id="CellTab" label="&cellTab.label;"/>
    </tabs>
    <tabpanels>

      <!-- TABLE PANEL -->
      <vbox>
        <groupbox orient="horizontal"><caption label="&size.label;"/>
          <grid>
            <columns><column/><column/><column/><column/><column/></columns>
              <rows>
                <row align="center">
                  <label value="&tableRows.label;" accesskey="&tableRows.accessKey;" control="TableRowsInput"/>
                  <textbox class="narrow" id="TableRowsInput" oninput="forceInteger(this.id);"/>
                  <spring class="bigspacer"/>
                  <label value="&tableHeight.label;" accesskey="&tableHeight.accessKey;"
                         id="TableHeightLabel" control="TableHeightInput"/>
                  <textbox class="narrow" id="TableHeightInput" oninput="forceInteger(this.id);"/>
                  <menulist id="TableHeightUnits"/>
                </row>
              <row align="center">
                <label value="&tableColumns.label;" accesskey="&tableColumns.accessKey;" control="TableColumnsInput"/>
                <textbox class="narrow" id="TableColumnsInput" oninput="forceInteger(this.id);"/>
                <spring class="bigspacer"/>
                <label value="&tableWidth.label;" accesskey="&tableWidth.accessKey;" control="TableWidthInput"/>
                <textbox class="narrow" id="TableWidthInput" oninput="forceInteger(this.id);"/>
                <menulist id="TableWidthUnits"/>
              </row>
            </rows>
            <!-- KEEP GRID LAYOUT here since we will be adding back support for table HEIGHT via CSS -->
          </grid>
        </groupbox>
        <groupbox><caption label="&tableBorderSpacing.label;"/>
        <grid>
          <columns><column/><column/><column/></columns>
          <rows>
            <row align="center">
              <label control="BorderWidthInput"
                     value="&tableBorderWidth.label;"
                     accesskey="&tableBorderWidth.accessKey;"/>
              <textbox class="narrow" id="BorderWidthInput" oninput="forceInteger(this.id);"/>
              <label align="left" value="&pixels.label;"/>
            </row>
            <row align="center">
              <label control="SpacingInput"
                     value="&tableSpacing.label;"
                     accesskey="&tableSpacing.accessKey;"/>
              <textbox class="narrow" id="SpacingInput" oninput="forceInteger(this.id);"/>
              <label value="&tablePxBetwCells.label;"/>
            </row>
            <row align="center">
              <label control="PaddingInput"
                     value="&tablePadding.label;"
                     accesskey="&tablePadding.accessKey;"/>
              <textbox class="narrow" id="PaddingInput" oninput="forceInteger(this.id);"/>
              <label value="&tablePxBetwBrdrCellContent.label;"/>
            </row>
          </rows>
        </grid>
        </groupbox>
        <!-- Table Alignment and Caption -->
        <hbox flex="1" align="center">
          <label control="TableAlignList"
                 value="&tableAlignment.label;"
                 accesskey="&tableAlignment.accessKey;"/>
          <menulist id="TableAlignList">
            <menupopup>
              <menuitem label="&AlignLeft.label;"   value="left"/>
              <menuitem label="&AlignCenter.label;" value="center"/>
              <menuitem label="&AlignRight.label;"  value="right"/>
            </menupopup>
          </menulist>
          <spacer class="spacer"/>
          <label control="TableCaptionList"
                 value="&tableCaption.label;"
                 accesskey="&tableCaption.accessKey;"/>
          <menulist id="TableCaptionList">
            <menupopup>
              <menuitem label="&tableCaptionNone.label;"  value=""/>
              <menuitem label="&tableCaptionAbove.label;" value="top"/>
              <menuitem label="&tableCaptionBelow.label;" value="bottom"/>
              <menuitem label="&tableCaptionLeft.label;"  value="left"/>
              <menuitem label="&tableCaptionRight.label;" value="right"/>
            </menupopup>
          </menulist>
        </hbox>
        <separator class="groove"/>
        <hbox align="center">
          <label value="&backgroundColor.label;"/>
          <button id="tableBackground" class="color-button" oncommand="GetColorAndUpdate('tableBackgroundCW');">
            <spacer id="tableBackgroundCW" class="color-well"/>
          </button>
          <spacer class="spacer"/>
          <label id="TableInheritColor" value="&tableInheritColor.label;" collapsed="true"/>
        </hbox>
        <separator class="groove"/>
        <hbox flex="1" align="center">
          <spacer flex="1"/>
          <!-- From EdDialogOvlerlay.xul -->
          <button id="AdvancedEditButton"/>
        </hbox>
        <spacer flex="1"/>
      </vbox><!-- Table Panel -->

      <!-- CELL PANEL -->
      <vbox>
        <groupbox orient="horizontal" align="center">
          <caption label="&cellSelection.label;"/>
          <vbox>
            <menulist id="SelectionList" oncommand="ChangeSelection(event.target.value)" flex="1">
              <menupopup>
                <!-- JS code assumes order is Cell, Row, Column -->
                <menuitem label="&cellSelectCell.label;"   value="1"/>
                <menuitem label="&cellSelectRow.label;"    value="2"/>
                <menuitem label="&cellSelectColumn.label;" value="3"/>
              </menupopup>
            </menulist>
            <hbox flex="1">
              <button id="PreviousButton" label="&cellSelectPrevious.label;" accesskey="&cellSelectPrevious.accessKey;" oncommand="MoveSelection(0)" flex="1"/>
              <button id="NextButton" class="align-right" label="&cellSelectNext.label;" accesskey="&cellSelectNext.accessKey;" oncommand="MoveSelection(1)" flex="1"/>
            </hbox>
          </vbox>
          <spacer class="bigspacer"/>
          <vbox flex="1">
            <label value="&applyBeforeChange1.label;"/>
            <label value="&applyBeforeChange2.label;"/>
          </vbox>
        </groupbox>
        <hbox align="center">
          <!-- cell size groupbox -->
          <groupbox><caption label="&size.label;"/>
            <grid>
              <columns><column/><column/><column flex="1"/></columns>
              <rows>
                <row align="center">
                  <checkbox id="CellHeightCheckbox" label="&tableHeight.label;" accesskey="&tableHeight.accessKey;"/>
                  <textbox class="narrow" id="CellHeightInput"
                           oninput="ChangeIntTextbox(this.id,'CellHeightCheckbox');"/>
                  <menulist id="CellHeightUnits" oncommand="SetCheckbox('CellHeightCheckbox');"/>
                </row>
                <row align="center">
                  <checkbox id="CellWidthCheckbox" label="&tableWidth.label;" accesskey="&tableWidth.accessKey;"/>
                  <textbox class="narrow" id="CellWidthInput"
                           oninput="ChangeIntTextbox(this.id,'CellWidthCheckbox');"/>
                  <menulist id="CellWidthUnits" oncommand="SetCheckbox('CellWidthCheckbox');"/>
                </row>
              </rows>
            </grid>
            <spacer class="bigspacer"/>
          </groupbox>
          <!-- Alignment -->
          <groupbox><caption label="&cellContentAlignment.label;"/>
            <grid>
              <columns><column/><column flex="1"/><column/></columns>
              <rows>
                <row align="center">
                  <checkbox id="CellVAlignCheckbox" label="&cellVertical.label;" accesskey="&cellVertical.accessKey;"/>
                  <menulist id="CellVAlignList" oncommand="SetCheckbox('CellVAlignCheckbox');">
                    <menupopup>
                      <menuitem label="&cellAlignTop.label;"    value="top"/>
                      <menuitem label="&cellAlignMiddle.label;" value="middle"/>
                      <menuitem label="&cellAlignBottom.label;" value="bottom"/>
                    </menupopup>
                  </menulist>
                </row>
                <row align="center">
                  <checkbox id="CellHAlignCheckbox" label="&cellHorizontal.label;" accesskey="&cellHorizontal.accessKey;"/>
                  <menulist id="CellHAlignList"  oncommand="SelectCellHAlign()">
                    <menupopup>
                      <menuitem label="&AlignLeft.label;"        value="left"/>
                      <menuitem label="&AlignCenter.label;"      value="center"/>
                      <menuitem label="&AlignRight.label;"       value="right"/>
                      <menuitem label="&cellAlignJustify.label;" value="justify"/>
                    </menupopup>
                  </menulist>
                </row>
              </rows>
            </grid>
          </groupbox>
        </hbox>
        <spacer class="spacer"/>
        <hbox align="center">
          <checkbox id="CellStyleCheckbox" label="&cellStyle.label;" accesskey="&cellStyle.accessKey;"/>
          <menulist id="CellStyleList" oncommand="SetCheckbox('CellStyleCheckbox');">
            <menupopup>
              <menuitem label="&cellNormal.label;" value="td"/>
              <menuitem label="&cellHeader.label;" value="th"/>
            </menupopup>
          </menulist>
          <spacer class="bigspacer"/>
          <checkbox id="TextWrapCheckbox" label="&cellTextWrap.label;" accesskey="&cellTextWrap.accessKey;"/>
          <menulist id="TextWrapList" oncommand="SetCheckbox('TextWrapCheckbox');">
            <menupopup>
              <menuitem label="&cellWrap.label;" value="wrap"/>
              <menuitem label="&cellNoWrap.label;" value="nowrap"/>
            </menupopup>
          </menulist>
        </hbox>
        <separator class="groove"/>
        <hbox align="center">
          <checkbox id="CellColorCheckbox" label="&backgroundColor.label;" accesskey="&backgroundColor.accessKey;"/>
          <button class="color-button" oncommand="GetColorAndUpdate('cellBackgroundCW');">
            <spacer id="cellBackgroundCW" class="color-well"/>
          </button>
          <spacer class="spacer"/>
          <label id="CellInheritColor" value="&cellInheritColor.label;" collapsed="true"/>
        </hbox>
        <separator class="groove"/>
        <hbox align="center">
          <description class="wrap" flex="1" style="width: 1em">&cellUseCheckboxHelp.label;</description>
          <!-- From EdDialogOvlerlay.xul -->
          <button id="AdvancedEditButton2"/>
        </hbox>
        <spacer flex="1"/>
      </vbox><!-- Cell Panel -->
    </tabpanels> 
  </tabbox>
  <spacer class="spacer"/>
</dialog>