gecko-dev/editor/ui/dialogs/content/EdTableProps.xul

280 строки
12 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):
- 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://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">
<window class="dialog" title="&tableWindow.title;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
orient="vertical">
<!-- Methods common to all editor dialogs -->
<script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
<script language="JavaScript" src="chrome://editor/content/EdTableProps.js"/>
<script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
<spring id="location" offsetY="50" persist="offsetX offsetY"/>
<broadcaster id="args" value=""/>
<keyset id="keyset"/>
<tabcontrol align="vertical" orient="vertical">
<tabbox flex="1">
<tab id="TableTab" oncommand="SelectTableTab()" value="&tableTab.label;"/>
<tab id="CellTab" oncommand="SelectCellTab()" value="&cellTab.label;"/>
</tabbox>
<tabpanel orient="vertical" id="TabPanel">
<!-- TABLE PANEL -->
<box id="TablePanel" orient="vertical">
<titledbox><title value="&size.label;"/>
<grid>
<columns><column/><column/></columns>
<rows>
<row valign="middle">
<text class="label" value="&tableRows.label;"/>
<textfield class="narrow" id="TableRowsInput" oninput="forceInteger(this.id);"/>
</row>
<row valign="middle">
<text class="label" value="&tableColumns.label;"/>
<textfield class="narrow" id="TableColumnsInput" oninput="forceInteger(this.id);"/>
</row>
</rows>
</grid>
<spring class="bigspacer"/>
<grid>
<columns><column/><column/><column/></columns>
<rows>
<row valign="middle">
<text class="label" value="&tableWidth.label;"/>
<textfield class="narrow" id="TableWidthInput" oninput="forceInteger(this.id);"/>
<menulist id="TableWidthUnits"/>
</row>
</rows>
</grid>
</titledbox>
<titledbox orient="vertical"><title align="left" value="&tableBorderSpacing.label;"/>
<grid>
<columns><column/><column/><column/></columns>
<rows>
<row valign="middle">
<text class="label" value="&tableBorderWidth.label;"/>
<textfield class="narrow" id="BorderWidthInput" oninput="forceInteger(this.id);"/>
<text class="label" align="left" value="&pixels.label;"/>
</row>
<row valign="middle">
<text class="label" value="&tableSpacing.label;"/>
<textfield class="narrow" id="SpacingInput" oninput="forceInteger(this.id);"/>
<text class="label" value="&tablePxBetwCells.label;"/>
</row>
<row valign="middle" autostretch="never">
<text class="label" value="&tablePadding.label;"/>
<textfield class="narrow" id="PaddingInput" oninput="forceInteger(this.id);"/>
<text class="label" value="&tablePxBetwBrdrCellContent.label;"/>
</row>
</rows>
</grid>
</titledbox>
<!-- Table Alignment and Caption -->
<box flex="1" valign="middle" autostretch="never">
<text class="label" value="&tableAlignment.label;"/>
<menulist id="TableAlignList">
<menupopup>
<menuitem value="&AlignLeft.label;" data="left"/>
<menuitem value="&AlignCenter.label;" data="center"/>
<menuitem value="&AlignRight.label;" data="right"/>
</menupopup>
</menulist>
<spring class="spacer"/>
<text class="label" value="&tableCaption.label;"/>
<menulist id="TableCaptionList">
<menupopup>
<menuitem value="&tableCaptionNone.label;" data=""/>
<menuitem value="&tableCaptionAbove.label;" data="top"/>
<menuitem value="&tableCaptionBelow.label;" data="bottom"/>
</menupopup>
</menulist>
</box>
<separator class="groove"/>
<box valign="middle" autostretch="never">
<text class="label" value="&backgroundColor.label;"/>
<stack>
<button class="dialog color-button" oncommand="GetColorAndUpdate('tableBackgroundCW');"/>
<box autostretch="never" valign="middle" mousethrough="always">
<spring flex="1"/>
<spring id="tableBackgroundCW" class="color-well"/>
<spring flex="1"/>
</box>
</stack>
<spring class="spacer"/>
<text class="label" id="TableInheritColor" value="&tableInheritColor.label;" collapsed="true"/>
</box>
<separator class="groove"/>
<box flex="1" autostretch="never">
<spring flex="1"/>
<!-- From EdDialogOvlerlay.xul -->
<button class="dialog" id="AdvancedEditButton"/>
</box>
<spring flex="1"/>
</box><!-- Table Panel -->
<!-- CELL PANEL -->
<box id="CellPanel" orient="vertical">
<titledbox autostretch="never" valign="middle">
<title value="&cellSelection.label;"/>
<box orient="vertical">
<menulist id="SelectionList" oncommand="ChangeSelection(event.target.data)" flex="1">
<menupopup>
<!-- JS code assumes order is Cell, Row, Column -->
<menuitem value="&cellSelectCell.label;" data="1"/>
<menuitem value="&cellSelectRow.label;" data="2"/>
<menuitem value="&cellSelectColumn.label;" data="3"/>
</menupopup>
</menulist>
<box flex="1">
<button id="PreviousButton" class="dialog" value="&cellSelectPrevious.label;" oncommand="MoveSelection(0)" flex="1"/>
<button id="NextButton" class="dialog right" value="&cellSelectNext.label;" oncommand="MoveSelection(1)" flex="1"/>
</box>
</box>
<spring class="bigspacer"/>
<box orient="vertical" flex="1">
<text class="label" value="&applyBeforeChange1.label;"/>
<text class="label" value="&applyBeforeChange2.label;"/>
</box>
</titledbox>
<!-- cell size titledbox -->
<titledbox><title align="left" value="&size.label;"/>
<grid>
<columns><column/><column/><column/></columns>
<rows>
<row valign="middle" autostretch="never">
<checkbox id="CellHeightCheckbox" value="&tableHeight.label;"/>
<textfield class="narrow" id="CellHeightInput" oninput="ChangeIntTextfield(this.id,'CellHeightCheckbox');"/>
<menulist id="CellHeightUnits" oncommand="SetCheckbox('CellHeightCheckbox');"/>
</row>
<row valign="middle" autostretch="never">
<checkbox id="CellWidthCheckbox" value="&tableWidth.label;"/>
<textfield class="narrow" id="CellWidthInput" oninput="ChangeIntTextfield(this.id,'CellWidthCheckbox');"/>
<menulist id="CellWidthUnits" oncommand="SetCheckbox('CellWidthCheckbox');"/>
</row>
</rows>
</grid>
<spring class="bigspacer"/>
<grid>
<columns><column/><column/></columns>
<rows>
<row valign="middle" autostretch="never">
<checkbox id="RowSpanCheckbox" value="&cellRowSpan.label;"/>
<textfield class="narrow" id="RowSpanInput" oninput="ChangeIntTextfield(this.id,'RowSpanCheckbox');"/>
</row>
<row valign="middle" autostretch="never">
<checkbox id="ColSpanCheckbox" value="&cellColSpan.label;"/>
<textfield class="narrow" id="ColSpanInput" oninput="ChangeIntTextfield(this.id,'ColSpanCheckbox');"/>
</row>
</rows>
</grid>
</titledbox>
<!-- Alignment -->
<titledbox valign="middle" autostretch="never">
<title value="&cellContentAlignment.label;"/>
<checkbox id="CellHAlignCheckbox" value="&cellHorizontal.label;"/>
<menulist id="CellHAlignList" oncommand="SelectCellHAlign()">
<menupopup>
<menuitem value="&AlignLeft.label;" data="left"/>
<menuitem value="&AlignCenter.label;" data="center"/>
<menuitem value="&AlignRight.label;" data="right"/>
<menuitem value="&cellAlignJustify.label;" data="justify"/>
</menupopup>
</menulist>
<spring class="spacer"/>
<checkbox id="CellVAlignCheckbox" value="&cellVertical.label;"/>
<menulist id="CellVAlignList" oncommand="SetCheckbox('CellVAlignCheckbox');">
<menupopup>
<menuitem value="&cellAlignTop.label;" data="top"/>
<menuitem value="&cellAlignMiddle.label;" data="middle"/>
<menuitem value="&cellAlignBottom.label;" data="bottom"/>
</menupopup>
</menulist>
</titledbox>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<checkbox id="CellStyleCheckbox" value="&cellStyle.label;"/>
<menulist id="CellStyleList" oncommand="SetCheckbox('CellStyleCheckbox');">
<menupopup>
<menuitem value="&cellNormal.label;" data="td"/>
<menuitem value="&cellHeader.label;" data="th"/>
</menupopup>
</menulist>
<spring class="bigspacer"/>
<checkbox id="TextWrapCheckbox" value="&cellTextWrap.label;"/>
<menulist id="TextWrapList" oncommand="SetCheckbox('TextWrapCheckbox');">
<menupopup>
<menuitem value="&cellWrap.label;" data="wrap"/>
<menuitem value="&cellNoWrap.label;" data="nowrap"/>
</menupopup>
</menulist>
</box>
<separator class="groove"/>
<box valign="middle" autostretch="never">
<checkbox id="CellColorCheckbox" value="&backgroundColor.label;"/>
<stack>
<button class="dialog color-button" oncommand="GetColorAndUpdate('cellBackgroundCW');" flex="1"/>
<box autostretch="never" valign="middle" mousethrough="always">
<spring flex="1"/>
<spring id="cellBackgroundCW" class="color-well"/>
<spring flex="1"/>
</box>
</stack>
<spring class="spacer"/>
<text class="label" id="CellInheritColor" value="&cellInheritColor.label;" collapsed="true"/>
</box>
<separator class="groove"/>
<box autostretch="never">
<html class="wrap" flex="1" style="width: 1em">&cellUseCheckboxHelp.label;</html>
<!-- From EdDialogOvlerlay.xul -->
<button class="dialog" id="AdvancedEditButton2"/>
</box>
<spring flex="1"/>
</box><!-- Cell Panel -->
</tabpanel>
<spring class="spacer"/>
<!-- from EdDialogOverlay -->
<box>
<spring flex="1"/>
<button class="dialog" value="&applyButton.label;" oncommand="Apply();"/>
<box id="okCancelButtons"/>
</box>
</tabcontrol>
</window>