summaryrefslogtreecommitdiffstats
path: root/comm/suite/editor/components/dialogs/content/edImage.inc.xhtml
blob: e80fb0457cae490891f39602454d370714aba8fe (plain)
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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

      <vbox id="imageLocation">
        <spacer class="spacer"/>
        <label control = "srcInput"
          value = "&locationEditField.label;"
          accesskey="&locationEditField.accessKey;"
          tooltiptext="&locationEditField.tooltip;"
          />
        <tooltip id="shortenedDataURI">
          <label value="&locationEditField.shortenedDataURI;"/>
        </tooltip>
        <textbox id="srcInput" oninput="ChangeImageSrc();" tabindex="1" class="uri-element"
                 tooltiptext="&locationEditField.tooltip;"/>
        <hbox id="MakeRelativeHbox">
          <checkbox id="MakeRelativeCheckbox"
                    for="srcInput"
                    tabindex="2"
                    label="&makeUrlRelative.label;"
                    accesskey="&makeUrlRelative.accessKey;"
                    oncommand="MakeInputValueRelativeOrAbsolute(this);"
                    tooltiptext="&makeUrlRelative.tooltip;"/>
          <checkbox id="AttachSourceToMail"
                    hidden="true"
                    label="&attachImageSource.label;"
                    accesskey="&attachImageSource.accesskey;"
                    oncommand="DoAttachSourceCheckbox()"/>
          <spacer flex="1"/>
          <button id="ChooseFile"
                  tabindex="3"
                  oncommand="chooseFile()"
                  label="&chooseFileButton.label;"
                  accesskey="&chooseFileButton.accessKey;"/>
        </hbox>
        <spacer class="spacer"/>
        <radiogroup id="altTextRadioGroup" flex="1">
          <grid>
            <columns><column/><column flex="1"/></columns>
            <rows>
              <row align="center">
                <label
                  style   = "margin-left: 26px"
                  control = "titleInput"
                  accesskey = "&title.accessKey;"
                  value   ="&title.label;"
                  tooltiptext="&title.tooltip;"
                  for     = "titleInput"/>
                <textbox flex="1"
                  id      = "titleInput"
                  class   = "MinWidth20em"
                  tooltiptext="&title.tooltip;"
                  tabindex="4"/>
              </row>
              <row align="center">
                <radio id="altTextRadio" value="usealt-yes"
                       label="&altText.label;"
                       accesskey="&altText.accessKey;"
                       tooltiptext="&altTextEditField.tooltip;"
#ifndef MOZ_SUITE
            persist="selected"
#endif
                  oncommand = "SetAltTextDisabled(false);"
                  tabindex="5"/>
                <textbox flex="1"
                  id      = "altTextInput"
                  class   = "MinWidth20em"
                  tooltiptext="&altTextEditField.tooltip;"
                  oninput = "SetAltTextDisabled(false);"
                  tabindex="6"/>
              </row>
            </rows>
          </grid>

          <radio id="noAltTextRadio" value="usealt-no"
                 label="&noAltText.label;"
                 accesskey = "&noAltText.accessKey;"
#ifndef MOZ_SUITE
            persist="selected"
#endif
            oncommand = "SetAltTextDisabled(true);"/>
        </radiogroup>
      </vbox>

      <vbox id="imageDimensions" align="start">
        <spacer class="spacer"/>
        <hbox>
          <radiogroup id="imgSizeGroup">
            <radio
              id      = "actualSizeRadio"
              label   = "&actualSizeRadio.label;"
              accesskey = "&actualSizeRadio.accessKey;"
              tooltiptext="&actualSizeRadio.tooltip;"
              oncommand = "SetActualSize()"
              value="actual"/>
            <radio
              id      = "customSizeRadio"
              label   = "&customSizeRadio.label;"
              selected = "true"
              accesskey = "&customSizeRadio.accessKey;"
              tooltiptext="&customSizeRadio.tooltip;"
              oncommand = "doDimensionEnabling();"
              value="custom"/>
          </radiogroup>
          <spacer flex="1"/>
          <vbox>
            <spacer flex="1"/>
            <checkbox id="constrainCheckbox" label="&constrainCheckbox.label;"
                 accesskey="&constrainCheckbox.accessKey;"
                 oncommand="ToggleConstrain()"
                 tooltiptext="&constrainCheckbox.tooltip;"/>
          </vbox>
          <spacer flex="1"/>
        </hbox>
        <spacer class="spacer"/>
        <grid class="indent">
          <columns><column/><column/><column flex="1"/></columns>
          <rows>
            <row align="center">
              <label id    = "widthLabel"
                control   = "widthInput"
                accesskey = "&widthEditField.accessKey;"
                value = "&widthEditField.label;" />
              <textbox
                id       = "widthInput"
                class    = "narrow"
                oninput  = "constrainProportions(this.id, 'heightInput')"/>
              <menulist id = "widthUnitsMenulist"
                oncommand = "doDimensionEnabling();" />
              <!-- contents are appended by JS -->
            </row>
            <row align="center">
              <label id    = "heightLabel"
                control   = "heightInput"
                accesskey = "&heightEditField.accessKey;"
                value = "&heightEditField.label;" />
              <textbox
                id       = "heightInput"
                class    = "narrow"
                oninput  = "constrainProportions(this.id, 'widthInput')"/>
              <menulist id = "heightUnitsMenulist"
                oncommand = "doDimensionEnabling();" />
              <!-- contents are appended by JS -->
            </row>
          </rows>
        </grid>
        <spacer flex="1"/>
      </vbox>

      <hbox id="imageAppearance">
        <groupbox>
          <hbox class="groupbox-title">
            <label id="spacingLabel" class="header">&spacingBox.label;</label>
          </hbox>
          <grid>
            <columns><column/><column/><column/></columns>
            <rows>
              <row align="center">
                <label
                  class = "align-right"
                  id    = "leftrightLabel"
                  control = "imageleftrightInput"
                  accesskey = "&leftRightEditField.accessKey;"
                  value = "&leftRightEditField.label;"/>
                <textbox
                  class     = "narrow"
                  id        = "imageleftrightInput"
                  oninput   = "forceInteger(this.id)"/>
                <label
                  id    = "leftrighttypeLabel"
                  value = "&pixelsPopup.value;" />
              </row>
              <spacer class="spacer"/>
              <row align="center">
                <label
                  class = "align-right"
                  id    = "topbottomLabel"
                  control = "imagetopbottomInput"
                  accesskey = "&topBottomEditField.accessKey;"
                  value = "&topBottomEditField.label;"/>
                <textbox
                  class     = "narrow"
                  id        = "imagetopbottomInput"
                  oninput   = "forceInteger(this.id)"/>
                <label id="topbottomtypeLabel"
                       value="&pixelsPopup.value;" />
              </row>
              <spacer class="spacer"/>
              <row align="center">
                <label class="align-right"
                       id="borderLabel"
                       control="border"
                       accesskey="&borderEditField.accessKey;"
                       value="&borderEditField.label;"/>
                <textbox
                  class     = "narrow"
                  id        = "border"
                  oninput   = "forceInteger(this.id)"/>
                <label id="bordertypeLabel"
                       value="&pixelsPopup.value;" />
              </row>
            </rows>
          </grid>
        </groupbox>

        <vbox>
          <groupbox align="start">
            <hbox class="groupbox-title">
              <label id="alignLabel" class="header">&alignment.label;</label>
            </hbox>
            <menulist id="alignTypeSelect" class="align-menu">
              <menupopup>
                <menuitem class="align-menu menuitem-iconic"
                          value="top"
                          label="&topPopup.value;"/>
                <menuitem class="align-menu menuitem-iconic"
                          value="middle"
                          label="&centerPopup.value;"/>
                <menuitem class="align-menu menuitem-iconic"
                          value="bottom"
                          label="&bottomPopup.value;"/>
                <!-- HTML attribute value is opposite of the button label on purpose -->
                <menuitem class="align-menu menuitem-iconic"
                          value="right"
                          label="&wrapLeftPopup.value;"/>
                <menuitem class="align-menu menuitem-iconic"
                          value="left"
                          label="&wrapRightPopup.value;"/>
              </menupopup>
            </menulist>
          </groupbox>

          <groupbox>
            <hbox class="groupbox-title">
              <label id="imagemapLabel" class="header">&imagemapBox.label;</label>
            </hbox>
            <hbox equalsize="always">
            <button id="removeImageMap"
                    oncommand="removeImageMap()"
                    accesskey="&removeImageMapButton.accessKey;"
                    label="&removeImageMapButton.label;"
                    flex="1"/>
            <spacer flex="1"/><!-- remove when we restore Image Map Editor -->
            </hbox>
          </groupbox>
        </vbox>
      </hbox>