Mozilla/mozilla/editor/ui/dialogs/content/EdImageProps.xul
cmanske%netscape.com 95aaf59c06 Activated collapsing of table row in Image Dialog to implement 'More'/'Fewer' behavior, now that sizeToContent works!
git-svn-id: svn://10.0.0.236/trunk@46270 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-08 00:50:45 +00:00

669 lines
21 KiB
XML

<?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):
- Pete Collins
- Brian King
-->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorImageProperties.dtd">
<!-- dialog containing a control requiring initial setup -->
<xul:window class="dialog" title="&windowTitle.label;"
xmlns:xul ="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns="http://www.w3.org/TR/REC-html40"
onload = "Startup()"
align="vertical"
style="width: auto; height: auto;">
<!-- Methods common to all editor dialogs -->
<script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js">
</script>
<script language="JavaScript" src="chrome://editor/content/EdImageProps.js">
</script>
<script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
<xul:broadcaster id="args" value=""/>
<!-- /////////////////////// Parent table //////////////////////////////// -->
<table>
<tr>
<td>
<!-- /////////////////////// Choose File Alt text table /////////////////// -->
<table>
<tr>
<td colspan="2">
<fieldset id="imageInfo.fieldset" ><legend align="left"> &locationFieldset.label; </legend>
<table>
<tr>
<td align="right" valign="middle">
<label
class = "enabled"
for = "image.srcInput">
&locationEditField.label;
</label>
</td>
<td valign="middle">
<input
type = "text"
size = "30"
length = "30"
id = "image.srcInput"
onkeypress = "OnChangeSrc()"
onkeyup = "checkForImage( this.id ); doValueChanged()"
onmouseup = "checkForImage( this.id ); doValueChanged()"
onblur = "/*checkForImage( this.id ); doValueChanged()*/"
onfocus = "checkForImage( this.id ); doValueChanged()"
onchange = "OnChangeSrc(); doOverallEnabling()" />
<!-- onmouseup checks for a paste
onkeyup checks for typing
onblur is for good luck
-->
</td>
<td>
<button
id = "ChooseFile"
onclick = "chooseFile(); checkForImage( 'image.srcInput' );">
&chooseButton.label;
</button>
</td>
</tr>
<tr>
<td align="right" valign="middle">
<label
class = "enabled"
for = "image.altTextInput"
id = "image.altTextLabel">
&altTextEditField.label;
</label>
</td>
<td>
<input
type ="text"
size = "30"
id = "image.altTextInput"
onchange = "doValueChanged()"/>
</td>
<td/>
</tr>
</table>
</fieldset>
</td>
<td/>
</tr>
<tr>
<td>
<button
id = "MoreFewerButton"
class = "disabled"
onclick = "onMoreFewer()">
&FewerButton.label;
</button>
</td>
<td/>
</tr>
</table>
<!-- ////////////////////// "More" controls table ///////////////////////////////// -->
<div id="MoreRow" style="visibility: inherit; display: block;">
<table>
<tr>
<td>
<fieldset
id = "imagedimensionsFieldset" >
<legend
id = "dimensionsLegend"
class = "disabled"
align = "left">
&dimensionsFieldset.label;
</legend>
<table cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- THIS NEEDS TO BE onchange RATHER THAN onclick -->
<input
type = "radio"
name = "image.dimensionType"
id = "originalsizeRadio"
onclick = " doValueChanged();"
checked = "true" />
</td>
<td colspan="3">
<label
class = "disabled"
for = "originalsizeRadio"
id = "originalsizeLabel" >
&originalSizeRadio.label;
</label>
</td>
</tr>
<tr>
<td>
<!-- THIS NEEDS TO BE onchange RATHER THAN onclick -->
<input type="radio"
name = "image.dimensionType"
id = "customsizeRadio"
onclick = "doDimensionEnabling( true );" />
</td>
<td colspan="3">
<label
class = "disabled"
for = "customsizeRadio"
id = "customsizeLabel" >
&customSizeRadio.label;
</label>
</td>
</tr>
<!-- IMAGE WIDTH -->
<tr valign="middle">
<td/>
<td>
<label
class = "disabled"
for = "imagewidthInput"
id = "imagewidthLabel">
&widthEditField.label;
</label>
</td>
<td>
<input
type = "text"
size = "4"
length = "4"
id = "imagewidthInput"
disabled = "true"
onfocus = "oldSourceInt = this.value;"
onkeyup = "constrainProportions(this.id, 'imageheightInput')"
onchange = "doValueChanged()" />
</td>
<td>
<xul:titledbutton
class = "popup"
id = "widthunitSelect"
style = "width: 50px;"
disabled = "true"
value = "&pixelsPopup.value;"
align = "left"
popup = "PixelOrPercentMenu1"
popupanchor = "bottomleft"
onchange = "doValueChanged()" />
</td>
</tr>
<!-- IMAGE HEIGHT -->
<tr valign="middle">
<td/>
<td>
<label
class = "disabled"
for = "imageheightInput"
id = "imageheightLabel">
&heightEditField.label;
</label>
</td>
<td>
<input
type = "text"
size = "4"
length = "4"
id = "imageheightInput"
disabled = "true"
onfocus = "oldSourceInt = this.value;"
onkeyup = "constrainProportions(this.id, 'imagewidthInput')"
onchange = "doValueChanged()" />
</td>
<td>
<xul:titledbutton
class = "popup"
id = "heightunitSelect"
style = "width: 50px;"
disabled = "true"
value = "&pixelsPopup.value;"
align = "left"
popup = "PixelOrPercentMenu2"
popupanchor = "bottomleft"
onchange = "doValueChanged()" />
</td>
</tr>
<!-- CONSTRAIN DIMENSIONS -->
<tr valign="middle">
<td/>
<td/>
<td colspan="2">
<input
type = "checkbox"
id = "constrainCheckbox" />
<label
class = "disabled"
id = "constrainLabel"
for = "constrainCheckbox">
&constrainCheckbox.label;
</label>
</td>
</tr>
</table>
</fieldset>
</td>
<td align="right">
<!-- IMAGE ALIGNMENT -->
<label
class = "selectbox"
for = "image.alignType"
id = "imagealignmentLabel">
&alignment.label;
</label>
<xul:titledbutton
id = "image.alignType"
src = "resource:/chrome/editor/skin/default/images/ED_imgalignbottom.gif"
class = "popup"
popup = "ImageTextAlignment"
popupanchor = "bottomleft"
align = "left"
onchange = "doValueChanged()" />
<fieldset
id = "spacing.fieldset">
<legend
id = "spacingLegend"
class = "disabled"
align = "left">
&spacingFieldset.label;
</legend>
<table cellspacing="0" cellpadding="0">
<tr valign="middle">
<td align="right">
<label
class = "disabled"
for = "imageleftrightInput"
id = "leftrightLabel">
&leftRightEditField.label;
</label>
</td>
<td>
<input
type = "text"
size = "4"
length = "4"
maxlength = "4"
id = "imageleftrightInput"
onkeyup = "forceInteger(this.id)"
onchange = "doValueChanged()"/>
</td>
<td valign="middle">
<label
class = "disabled"
for = "imageleftrightInput"
id = "leftrighttypeLabel">
&pixelsPopup.value;
</label>
</td>
</tr>
<tr valign="middle">
<td align="right">
<label
class = "disabled"
for = "imagetopbottomInput"
id = "topbottomLabel">
&topBottomEditField.label;
</label>
</td>
<td>
<input
type = "text"
size = "4"
length = "4"
maxlength = "4"
id = "imagetopbottomInput"
onkeyup = "forceInteger(this.id)"
onchange = "doValueChanged()"/>
</td>
<td valign="middle">
<label
class = "disabled"
for = "imagetopbottomInput"
id = "topbottomtypeLabel">
&pixelsPopup.value;
</label>
</td>
</tr>
<tr valign="middle">
<td align="right">
<label
class = "disabled"
for = "imageborderInput"
id = "borderLabel">
&borderEditField.label;
</label>
</td>
<td>
<input
type ="text"
size = "4"
length = "4"
maxlength = "4"
id = "imageborderInput"
onkeyup = "forceInteger(this.id)"
onchange = "doValueChanged()" />
</td>
<td valign="middle">
<label
class = "disabled"
for = "imageborderInput"
id = "bordertypeLabel">
&pixelsPopup.value;
</label>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
<!-- from EdDialogOverlay -->
<xul:box id="advancedEditButtonNoHR"/>
</div> <!-- END of "MoreRow" block that is hidden by More/Fewer button -->
<!-- ///////////////////// End Parent Table //////////////////////////////////// -->
</td>
</tr>
</table>
<div><hr width="100%"/></div>
<!-- ////////////////////////// OK CANCEL Box /////////////////////////////// -->
<!-- from global dialogOverlay -->
<xul:box id="okCancelButtons"/>
<!-- ///////////////////// Image Percent 1 PopUp Window //////////////////////// -->
<xul:popup id = "PixelOrPercentMenu1">
<xul:window
class = "popup"
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
name = "menu2"
align = "vertical"
flex = "100%"
style="
background-color: #CCCCDD;
width: 70px;
height: auto;
display: block;
overflow: hidden;
font: 3mm tahoma,arial,helvetica,sans-serif;
padding: 0px;"
>
<xul:box align="vertical" flex="100%" style="border: 1px outset white;">
<xul:titledbutton
class = "select"
value = "&pixelsPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
onclick = "opener.SetPixelOrPercentByID('heightunitSelect', '');
opener.popupSelectedImage('&pixelsPopup.value;', 'widthunitSelect', 'value');
window.close();"/>
<xul:titledbutton
class = "select"
value = "&percentPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
onclick = "opener.SetPixelOrPercentByID('heightunitSelect', '%');
opener.popupSelectedImage('&percentPopup.value;', 'widthunitSelect', 'value');
window.close();"/>
</xul:box>
</xul:window>
</xul:popup>
<!-- ///////////////////// Image Percent 2 PopUp Window //////////////////////// -->
<xul:popup id = "PixelOrPercentMenu2">
<xul:window
class = "popup"
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
name = "menu2"
align = "vertical"
flex = "100%"
style="
background-color: #CCCCDD;
width: 70px;
height: auto;
display: block;
overflow: hidden;
font: 3mm tahoma,arial,helvetica,sans-serif;
padding: 0px;"
>
<xul:box align="vertical" flex="100%" style="border: 1px outset white;">
<xul:titledbutton
class = "select"
value = "&pixelsPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
onclick = "opener.SetPixelOrPercentByID('heightunitSelect', '');
opener.popupSelectedImage('&pixelsPopup.value;', 'heightunitSelect', 'value');
window.close();"/>
<xul:titledbutton
class = "select"
value = "&percentPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
onclick = "opener.SetPixelOrPercentByID('heightunitSelect', '%');
opener.popupSelectedImage('&percentPopup.value;', 'heightunitSelect', 'value');
window.close();"/>
</xul:box>
</xul:window>
</xul:popup>
<!-- ///////////////////// Image Align PopUp Window //////////////////////// -->
<xul:popup id="ImageTextAlignment">
<xul:window
class = "popup"
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
name = "imageAlignPopup"
align = "vertical"
flex = "100%"
style="
background-color: #CCCCDD;
width: auto;
height: auto;
display: block;
overflow: hidden;
font: 3mm tahoma,arial,helvetica,sans-serif;
padding: 0px;"
>
<xul:box align="vertical" flex="100%" style="border: 1px outset white;">
<xul:titledbutton
class = "dropdown"
src = "&topIcon.url;"
align = "left"
value = "&topPopup.value;"
onclick = "opener.SetImageAlignment('top');
opener.popupSelectedImage('&topIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
class = "dropdown"
align = "left"
src = "&centerIcon.url;"
value ="&centerPopup.value;"
onclick = "opener.SetImageAlignment('middle');
opener.popupSelectedImage('&centerIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
class = "dropdown"
src = "&bottomIcon.url;"
align = "left"
value = "&bottomPopup.value;"
onclick = "opener.SetImageAlignment('bottom', 'image.alignType');
opener.popupSelectedImage('&bottomIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
class = "dropdown"
src = "&wrapRightIcon.url;"
align = "left"
value = "&wrapRightPopup.value;"
onclick = "opener.SetImageAlignment('left', 'image.alignType');
opener.popupSelectedImage('&wrapRightIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
class = "dropdown"
src = "&wrapLeftIcon.url;"
align = "left"
value = "&wrapLeftPopup.value;"
onclick = "opener.SetImageAlignment('right');
opener.popupSelectedImage('&wrapLeftIcon.url;', 'image.alignType', 'src');
window.close();" />
</xul:box>
</xul:window>
</xul:popup>
</xul:window>
<!-- The old stuff:
<input type="checkbox"> Leave Image at Original Location
<input type="checkbox"> Page Background
<input type="button" value=" Edit Image "/>
<input type="button" value=" Remove Image Map " disabled />
-->