Fixed Editor bugs 28873, 29691, most of fixes for 14342 and 20973. r=sfraser

git-svn-id: svn://10.0.0.236/trunk@63039 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cmanske%netscape.com
2000-03-15 14:37:12 +00:00
parent 02f35cde11
commit a529f3c5da
19 changed files with 1221 additions and 735 deletions

View File

@@ -312,7 +312,10 @@ function EditorOpen()
function EditorOpenRemote()
{
/* note that if the last parameter is not 0, the default will be for a browser window rather than a composer window */
/* The last parameter is the current browser window.
Use 0 and the default checkbox will be to load into an editor
and loading into existing browser option is removed
*/
window.openDialog( "chrome://navigator/content/openLocation.xul", "_blank", "chrome,modal", 0);
}
@@ -493,6 +496,7 @@ function EditorSelectParagraphFormat()
return;
editorShell.SetParagraphFormat(gParagraphTagNames[select.selectedIndex]);
}
contentWindow.focus();
}
function onParagraphFormatChange()
@@ -505,6 +509,7 @@ function onParagraphFormatChange()
var format = select.getAttribute("format");
if ( format == "mixed")
{
dump("Mixed paragraph format *******\n");
// No single type selected
newIndex = -1;
}
@@ -541,6 +546,7 @@ function EditorSelectFontFace()
EditorSetFontFace(gFontFaceNames[select.selectedIndex]);
}
contentWindow.focus();
}
function onFontFaceChange()
@@ -590,6 +596,7 @@ function EditorSetFontFace(fontFace)
editorShell.SetTextProperty("font", "face", fontFace);
}
}
dump("Setting focus to content window...\n");
contentWindow.focus();
}
@@ -685,36 +692,71 @@ function EditorSetFontSize(size)
function EditorIncreaseFontSize()
{
editorShell.IncreaseFontSize();
contentWindow.focus();
}
function EditorDecreaseFontSize()
{
editorShell.DecreaseFontSize();
contentWindow.focus();
}
function EditorSelectTextColor(ColorPickerID, ColorWellID)
{
var color = getColorAndSetColorWell(ColorPickerID, ColorWellID);
dump("EditorSelectTextColor: "+color+"\n");
EditorSetFontColor(color);
}
function EditorSelectBackColor(ColorPickerID, ColorWellID)
{
var color = getColorAndSetColorWell(ColorPickerID, ColorWellID);
dump("EditorSelectBackColor: "+color+"\n");
EditorSetBackgroundColor(color);
// Close appropriate menupopup
var menupopup;
if (ColorPickerID == "menuTextCP")
menupopup = document.getElementById("formatMenuPopup");
else if (ColorPickerID == "TextColorPicker")
menupopup = document.getElementById("TextColorPopup");
if (menupopup) menupopup.closePopup();
EditorSetFontColor(color);
contentWindow.focus();
}
function EditorRemoveTextColor(ColorWellID)
{
if (ColorWellID)
{
var menupopup = document.getElementById("TextColorPopup");
if (menupopup) menupopup.closePopup();
}
//TODO: Set colorwell to browser's default color
editorShell.SetTextProperty("font", "color", "");
contentWindow.focus();
}
function EditorSelectBackColor(ColorPickerID, ColorWellID)
{
var color = getColorAndSetColorWell(ColorPickerID, ColorWellID);
dump("EditorSelectBackColor: "+color+"\n");
// Close appropriate menupopup
var menupopup;
if (ColorPickerID == "menuBackCP")
menupopup = document.getElementById("formatMenuPopup");
else if (ColorPickerID == "BackColorPicker")
menupopup = document.getElementById("BackColorPopup");
if (menupopup) menupopup.closePopup();
EditorSetBackgroundColor(color);
contentWindow.focus();
}
function EditorRemoveBackColor(ColorWellID)
{
if (ColorWellID)
{
var menupopup = document.getElementById("BackColorPopup");
if (menupopup) menupopup.closePopup();
}
//TODO: Set colorwell to browser's default color
editorShell.SetBackgroundColor("");
contentWindow.focus();
@@ -1111,27 +1153,32 @@ function CheckSpelling()
contentWindow.focus();
}
function InitBackColorPopup()
function SetBackColorString(xulElementID)
{
var caption = document.getElementById("BackColorCaption");
if (caption)
var xulElement = document.getElementById(xulElementID);
if (xulElement)
{
var captionStr;
var textVal;
var isSelectedObj = new Object();
var tagNameObj = new Object();
var element = editorShell.GetSelectedOrParentTableElement(tagNameObj, isSelectedObj);
if (tagNameObj.value == "table")
captionStr = editorShell.GetString("TableBackColor");
textVal = editorShell.GetString("TableBackColor");
else if (tagNameObj.value == "td")
captionStr = editorShell.GetString("CellBackColor");
textVal = editorShell.GetString("CellBackColor");
else
captionStr = editorShell.GetString("PageBackColor");
textVal = editorShell.GetString("PageBackColor");
caption.setAttribute("value",captionStr);
xulElement.setAttribute("value",textVal);
}
}
function InitBackColorPopup()
{
SetBackColorString("BackColorCaption");
}
function EditorInitEditMenu()
{
// We will be modifying the Paste menuitem in the future
@@ -1139,8 +1186,11 @@ function EditorInitEditMenu()
function EditorInitFormatMenu()
{
var propertiesMenu = document.getElementById("objectProperties");
if (propertiesMenu)
// Set the string for the background color menu item
SetBackColorString("backgroundColorMenu");
var menuItem = document.getElementById("objectProperties");
if (menuItem)
{
var element = GetSelectedElementOrParentCell();
if (element)
@@ -1148,8 +1198,8 @@ function EditorInitFormatMenu()
dump("TagName="+element.nodeName+"\n");
if (element.nodeName)
{
propertiesMenu.removeAttribute("hidden");
propertiesMenu.removeAttribute("disabled");
menuItem.removeAttribute("hidden");
menuItem.removeAttribute("disabled");
var objStr;
var menuStr = editorShell.GetString("ObjectProperties");
@@ -1163,12 +1213,8 @@ function EditorInitFormatMenu()
break;
case 'TABLE':
objStr = editorShell.GetString("Table");
//TEMP FOR BETA1: Disable item - dialog not working
propertiesMenu.setAttribute("disabled", "true")
break;
case 'TD':
//TEMP FOR BETA1: Disable item - dialog not working
propertiesMenu.setAttribute("disabled", "true")
objStr = editorShell.GetString("TableCell");
break;
case 'A':
@@ -1179,11 +1225,13 @@ function EditorInitFormatMenu()
break;
}
menuStr = menuStr.replace(/%obj%/,objStr);
propertiesMenu.setAttribute("value", menuStr)
menuItem.setAttribute("value", menuStr)
}
} else {
// No element to set properties on - hide menu item
propertiesMenu.setAttribute("hidden","true");
// This works only on Mac and Linux
menuItem.setAttribute("hidden","true");
}
}
}
@@ -1483,7 +1531,10 @@ function onListFormatChange(listType)
function getColorAndSetColorWell(ColorPickerID, ColorWellID)
{
var colorWell = document.getElementById(ColorWellID);
var colorWell;
if (ColorWellID)
colorWell = document.getElementById(ColorWellID);
var colorPicker = document.getElementById(ColorPickerID);
if (colorPicker)
{
@@ -1507,9 +1558,6 @@ function EditorInsertOrEditTable(insertAllowed)
{
var table = editorShell.GetElementOrParentByTagName("table", null);
if (table) {
//TEMP FOR BETA1: Disable item - dialog not working
dump("Function not implemented\n");
return;
// Edit properties of existing table
dump("Existing table found ... Editing its properties\n");
@@ -1522,9 +1570,6 @@ function EditorInsertOrEditTable(insertAllowed)
function EditorTableCellProperties()
{
//TEMP FOR BETA1: Disable item - dialog not working
dump("Function not implemented\n");
return;
var cell = editorShell.GetElementOrParentByTagName("td", null);
if (cell) {
// Start Table Properties dialog on the "Cell" panel
@@ -1535,36 +1580,31 @@ function EditorTableCellProperties()
function EditorSelectTableCell()
{
//TEMP FOR BETA1: Disable item - dialog not working
// editorShell.SelectTableCell();
editorShell.SelectTableCell();
contentWindow.focus();
}
function EditorSelectAllTableCells()
{
//TEMP FOR BETA1: Disable item - dialog not working
// editorShell.SelectAllTableCells();
editorShell.SelectAllTableCells();
contentWindow.focus();
}
function EditorSelectTable()
{
//TEMP FOR BETA1: Disable item - dialog not working
// editorShell.SelectTableCell();
editorShell.SelectTableCell();
contentWindow.focus();
}
function EditorSelectTableRow()
{
//TEMP FOR BETA1: Disable item - dialog not working
// editorShell.SelectTableRow();
editorShell.SelectTableRow();
contentWindow.focus();
}
function EditorSelectTableColumn()
{
//TEMP FOR BETA1: Disable item - dialog not working
// editorShell.SelectTableColumn();
editorShell.SelectTableColumn();
contentWindow.focus();
}
@@ -1583,12 +1623,14 @@ function EditorInsertTableCell(after)
function EditorInsertTableRow(below)
{
dump("EditorInsertTableRow, below="+below+"\n");
editorShell.InsertTableRow(1,below);
contentWindow.focus();
}
function EditorInsertTableColumn(after)
{
dump("EditorInsertTableColumn, after="+after+"\n");
editorShell.InsertTableColumn(1,after);
contentWindow.focus();
}

View File

@@ -58,9 +58,3 @@ table {
table[empty-cells=show] {
border: 1px dotted red;
}
td, tr {
min-height: 10px;
min-line-height: 10px;
}

View File

@@ -81,7 +81,7 @@
<menubar id="main-menubar" chromeclass="menubar">
<menu id="fileMenu"/>
<menu id="editMenu" oncreate="EditorInitEditMenu()"/>
<menu id="editMenu"/>
<menu value="&viewMenu.label;" accesskey="&viewmenu.accesskey;">
<!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
@@ -197,7 +197,6 @@
<spring class="spacer3"/>
<titledbutton id="EditModeButton" class="DisplayModeButton" selected="1" value="&showExtraMarkup.label;" onclick="EditorSetDisplayStyle(0)"/>
<titledbutton id="BrowserModeButton" class="DisplayModeButton" selected="0" value="&hideExtraMarkup.label;" onclick="EditorSetDisplayStyle(1)"/>
<html:div class="VerticalSeparator"/>
<spring flex="100%"/>
<!--
Use this when implemented...

View File

@@ -70,8 +70,8 @@
<key id="calendarkb" xulkey="true" key="4" onkeypress="Calendar()" />
<key id="indentkb" xulkey="true" key="&formatindent.keybinding;" onkeypress="EditorIndent('indent')" />
<key id="outdentkb" xulkey="true" key="&formatoutdent.keybinding;" onkeypress="EditorIndent('outdent')" />
<key id="increaseindentkb" xulkey="true" key="&formatindent.keybinding;" onkeypress="EditorIndent('indent')" />
<key id="decreaseindentkb" xulkey="true" key="&formatoutdent.keybinding;" onkeypress="EditorIndent('outdent')" />
<key id="removestyleskb" shift="true" xulkey="true" key="&formatremovestyles.keybinding;" onkeypress="EditorRemoveStyle('all')" />
<key id="decreasefontsizekb" shift="true" xulkey="true" key="&decreaseFontSize.keybinding;" onkeypress="EditorDecreaseFontSize()" />
@@ -173,7 +173,7 @@
<broadcaster id="Editor:Open" oncommand="EditorOpen()"/>
<broadcaster id="Editor:Save" value="&saveCmd.label;" oncommand="EditorSave()" disabled="true"/>
<broadcaster id="Editor:SaveAs" value="&saveAsCmd.label;" oncommand="EditorSaveAs()"/>
<broadcaster id="Editor:Preview" value="&previewCmd.label;" oncommand="EditorPreview()"/>
<broadcaster id="Editor:Preview" oncommand="EditorPreview()"/>
<broadcaster id="Editor:Close" value="&closeCmd.label;" oncommand="EditorClose()"/>
<broadcaster id="Editor:PrintSetup" value="&printSetupCmd.label;" oncommand="EditorPrintSetup()" disabled="true"/>
<broadcaster id="Editor:PrintPreview" value="&printPreviewCmd.label;" oncommand="EditorPrintPreview()" disabled="true"/>
@@ -195,23 +195,24 @@
<broadcaster id="cmd_preferences"/>
</broadcasterset>
<!-- Editor menu items -->
<menu id="fileMenu" value="&fileMenu.label;" accesskey="&filemenu.accesskey;">
<!-- Editor menu items -->
<menu id="fileMenu" value="&fileMenu.label;" accesskey="&filemenu.accesskey;">
<menupopup>
<!-- From globalOverlay.xul -->
<!-- Note slightly different menu item text (value) used here DOESN'T WORK IN MENUS! -->
<menuitem id="menu_newEditor" observes="cmd_newEditor" value="&newBlankPage.label;"/>
<menu id="menu_New" value="&newMenu.label;" accesskey="&newMenu.accesskey;">
<menupopup id="menu_NewPopup">
<!-- Note: globalOverlay.xul uses menu_newEditor, but we want different menu item text
so we use our own id, value, and accesskey but connect to the same global key and broadcaster node
-->
<menuitem id="menu_newBlankPage" value="&newBlankPageCmd.label;" accesskey="&newBlankPage.accesskey;" key="key_newBlankPage" observes="cmd_newEditor"/>
<menu id="menu_New" value="&newMenu.label;" accesskey="&newMenu.accesskey;">
<menupopup id="menu_NewPopup">
<!-- From globalOverlay.xul -->
<menuitem id="menu_newEditorTemplate" observes="cmd_newEditorTemplate"/>
<menuitem id="menu_newEditorDraft" observes="cmd_newEditorDraft"/>
<menuseparator/>
<menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
<menuitem id="menu_newMessage" observes="cmd_newMessage"/>
<menuitem id="menu_newCard" observes="cmd_newCard"/>
</menupopup>
</menu>
<menuitem id="menu_newEditorTemplate" observes="cmd_newEditorTemplate"/>
<menuitem id="menu_newEditorDraft" observes="cmd_newEditorDraft"/>
<menuseparator/>
<menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
<menuitem id="menu_newMessage" observes="cmd_newMessage"/>
<menuitem id="menu_newCard" observes="cmd_newCard"/>
</menupopup>
</menu>
<menuitem accesskey="&fileopenremote.accesskey;" value="&openremoteCmd.label;" key="openremoteeditorkb" oncommand="EditorOpenRemote()"/>
<menuitem accesskey="&fileopen.accesskey;" key="openeditorkb" observes="Editor:Open" value="&openFileCmd.label;"/>
<menuseparator />
@@ -221,7 +222,7 @@
<menuseparator />
<!-- FRAME, LINK should go here, but nav must put them in global files -->
<menuitem id="menu_sendPage" observes="cmd_sendPage"/>
<menuitem accesskey="&filepreview.accesskey;" observes="Editor:Preview"/>
<menuitem accesskey="&filepreview.accesskey;" observes="Editor:Preview" value="&previewCmd.label;"/>
<menuseparator />
<menuitem accesskey="&fileprintsetup.accesskey;" observes="Editor:PrintSetup" />
<menuitem accesskey="&fileprintpreview.accesskey;" observes="Editor:PrintPreview"/>
@@ -229,10 +230,10 @@
<menuseparator />
<menuitem accesskey="&fileexit.accesskey;" key="exitkb" observes="Editor:Exit"/>
</menupopup>
</menu>
</menu>
<menu id="editMenu" value="&editMenu.label;" accesskey="&editmenu.accesskey;">
<menupopup id="edEditMenuPopup">
<menu id="editMenu" value="&editMenu.label;" accesskey="&editmenu.accesskey;">
<menupopup id="edEditMenuPopup" oncreate="EditorInitEditMenu()">
<!-- from globalOverlay.xul -->
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
@@ -240,7 +241,6 @@
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_pastequote" accesskey="&editpastequotation.accesskey;" key="pastequotationkb" observes="cmd_pasteQuote"/>
<menuitem id="menu_delete"/>
<menuseparator id="edEditMenuSep2" />
<menuitem id="menu_selectAll"/>
@@ -250,110 +250,109 @@
<menuseparator id="edEditMenuSep4" />
<menuitem id="menu_checkspelling" accesskey="&editcheckspelling.accesskey;" key="checkspellingkb" observes="cmd_checkSpelling"/>
<menuseparator id="edEditMenuSep5" />
<!-- TODO: PREF PANELS FOR EDITOR. Replace pref-publish with pref-editor -->
<menuitem id="menu_preferences" oncommand="goPreferences('navigator.xul', 'chrome://pref/content/pref-composer.xul')"/>
</menupopup>
</menu>
<!-- view menu items -->
<menu id="viewToolbar" value="&viewToolbarsMenu.label;" accesskey="&viewToolbarsMenu.accesskey;">
<menupopup>
<menuitem id="compToolbarMenuitem" accesskey="&viewcompositiontb.accesskey;" observes="Editor:ToggleCompositionToolbar"/>
<menuitem id="formatToolbarMenuitem" accesskey="&viewformattingtb.accesskey;" observes="Editor:ToggleFormattingToolbar"/>
<menuitem id="editorTaskBar" value="&showTaskbarCmd.label;" accesskey="&showTaskbarCmd.accesskey;" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
</menupopup>
</menu>
<menuitem id="viewSourceMenuitem" value="&viewPageSource.label;" accesskey="&viewpagesource.accesskey;" oncommand="EditorViewSource();"/>
<!-- view menu items -->
<menu id="viewToolbar" value="&viewToolbarsMenu.label;" accesskey="&viewToolbarsMenu.accesskey;">
<menupopup>
<menuitem id="compToolbarMenuitem" accesskey="&viewcompositiontb.accesskey;" observes="Editor:ToggleCompositionToolbar"/>
<menuitem id="formatToolbarMenuitem" accesskey="&viewformattingtb.accesskey;" observes="Editor:ToggleFormattingToolbar"/>
<menuitem id="editorTaskBar" value="&showTaskbarCmd.label;" accesskey="&showTaskbarCmd.accesskey;" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<menu id="charsetMenu" value="&dcharMenu.label;" accesskey="&viewcharsetmenu.accesskey;">
<menupopup>
<menuitem value="&dcharIso1Cmd.label;" accesskey="&charsetLatin1.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-1');"/>
<menuitem value="&dcharIso15Cmd.label;" accesskey="&charsetLatin9.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-15');"/>
<menuitem value="&dcharIso2Cmd.label;" accesskey="&charsetLatin2.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-2');"/>
<menuitem value="&dcharIso3Cmd.label;" accesskey="&charsetLatin3.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-3');"/>
<menuitem value="&dcharIso4Cmd.label;" accesskey="&charsetLatin4.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-4');"/>
<menuitem value="&dcharIsoGreekCmd.label;" accesskey="&charsetGreek.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-7');"/>
<menuitem value="&dcharIso9Cmd.label;" accesskey="&charsetLatin5.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-9');"/>
<menuitem value="&dcharIso10Cmd.label;" accesskey="&charsetLatin6.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-10');"/>
<menuitem value="&dcharIso13Cmd.label;" accesskey="&charsetLatin7.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-13');"/>
<menuitem value="&dcharIso14Cmd.label;" accesskey="&charsetLatin8.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-14');"/>
</menupopup>
</menu>
<menuitem id="viewSourceMenuitem" value="&viewPageSource.label;" accesskey="&viewpagesource.accesskey;" oncommand="EditorViewSource();"/>
<menu id="charsetMenu" value="&dcharMenu.label;" accesskey="&viewcharsetmenu.accesskey;">
<menupopup>
<menuitem value="&dcharIso1Cmd.label;" accesskey="&charsetLatin1.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-1');"/>
<menuitem value="&dcharIso15Cmd.label;" accesskey="&charsetLatin9.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-15');"/>
<menuitem value="&dcharIso2Cmd.label;" accesskey="&charsetLatin2.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-2');"/>
<menuitem value="&dcharIso3Cmd.label;" accesskey="&charsetLatin3.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-3');"/>
<menuitem value="&dcharIso4Cmd.label;" accesskey="&charsetLatin4.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-4');"/>
<menuitem value="&dcharIsoGreekCmd.label;" accesskey="&charsetGreek.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-7');"/>
<menuitem value="&dcharIso9Cmd.label;" accesskey="&charsetLatin5.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-9');"/>
<menuitem value="&dcharIso10Cmd.label;" accesskey="&charsetLatin6.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-10');"/>
<menuitem value="&dcharIso13Cmd.label;" accesskey="&charsetLatin7.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-13');"/>
<menuitem value="&dcharIso14Cmd.label;" accesskey="&charsetLatin8.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-14');"/>
</menupopup>
</menu>
<menu id="charsetMenu1" value="&dcharMenu1.label;" accesskey="&viewcharsetmenu1.accesskey;">
<menupopup>
<menuitem value="&dcharJapanCmd.label;" accesskey="&charsetJIS.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-2022-JP');"/>
<menuitem value="&dcharJapanShiftjsCmd.label;" accesskey="&charsetshiftJIS.accesskey;" oncommand="EditorSetDocumentCharacterSet('Shift_JIS');"/>
<menuitem value="&dcharJapanEucCmd.label;" accesskey="&charsetJapaneseEUC.accesskey;" oncommand="EditorSetDocumentCharacterSet('EUC-JP');"/>
<menuseparator />
<menuitem value="&dcharTradChiBigCmd.label;" accesskey="&charsetChineseBig5.accesskey;" oncommand="EditorSetDocumentCharacterSet('Big5');"/>
<menuitem value="&dcharTriChiEucCmd.label;" accesskey="&charsetChineseEUC.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-euc-tw');"/>
<menuitem value="&dcharSimpChiGbCmd.label;" accesskey="&charsetChineseSimplified.accesskey;" oncommand="EditorSetDocumentCharacterSet('GB2312');"/>
<menuseparator />
<menuitem value="&dcharKoreanCmd.label;" accesskey="&charsetKorean.accesskey;" oncommand="EditorSetDocumentCharacterSet('EUC-KR');"/>
<menuseparator />
<menuitem value="&dcharUtf7Cmd.label;" accesskey="&charsetUTF7.accesskey;" oncommand="EditorSetDocumentCharacterSet('UTF-7');"/>
<menuitem value="&dcharUtf8Cmd.label;" accesskey="&charsetUTF8.accesskey;" oncommand="EditorSetDocumentCharacterSet('UTF-8');"/>
</menupopup>
</menu>
<menu id="charsetMenu2" value="&dcharMenu2.label;" accesskey="&viewcharsetmenu2.accesskey;">
<menupopup>
<menuitem value="&dcharRusCmd.label;" accesskey="&charsetRussian.accesskey;" oncommand="EditorSetDocumentCharacterSet('KOI8-R');"/>
<menuitem value="&dcharIsoCyrCmd.label;" accesskey="&charsetISOCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-5');"/>
<menuitem value="&dcharWinCyrCmd.label;" accesskey="&charsetWinCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1251');"/>
<menuitem value="&dcharEcmaCyrCmd.label;" accesskey="&charsetECMACyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-IR-111');"/>
<menuitem value="&dcharDosCyrCmd.label;" accesskey="&charsetDOSCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('IBM866');"/>
<menuitem value="&dcharMacCyrCmd.label;" accesskey="&charsetMacCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-cyrillic');"/>
<menuitem value="&dcharUkrCmd.label;" accesskey="&charsetUkrainian.accesskey;" oncommand="EditorSetDocumentCharacterSet('KOI8-U');"/>
<menuitem value="&dcharMacUkrCmd.label;" accesskey="&charsetMacUkrainian.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-ukrainian');"/>
</menupopup>
</menu>
<menu id="charsetMenu3" value="&dcharMenu3.label;" accesskey="&viewcharsetmenu3.accesskey;">
<menupopup>
<menuitem value="&dcharWinVietCmd.label;" accesskey="&charsetWinVietnamese.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1258');"/>
<menuitem value="&dcharVietTcnCmd.label;" accesskey="&charsetVietnameseTCN.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-viet-tcvn5712');"/>
<menuitem value="&dcharVietViCmd.label;" accesskey="&charsetVietnameseVIS.accesskey;" oncommand="EditorSetDocumentCharacterSet('VISCII');"/>
<menuitem value="&dcharVieVpCmd.label;" accesskey="&charsetVietnameseVPS.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-viet-vps');"/>
<menuseparator />
<menuitem value="&dcharThaiCmd.label;" accesskey="&charsetThai.accesskey;" oncommand="EditorSetDocumentCharacterSet('TIS-620');"/>
<menuseparator />
<menuitem value="&dcharArmCmd.label;" accesskey="&charsetArmenian.accesskey;" oncommand="EditorSetDocumentCharacterSet('ARMSCII-8');"/>
</menu>
<menu id="charsetMenu1" value="&dcharMenu1.label;" accesskey="&viewcharsetmenu1.accesskey;">
<menupopup>
<menuitem value="&dcharJapanCmd.label;" accesskey="&charsetJIS.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-2022-JP');"/>
<menuitem value="&dcharJapanShiftjsCmd.label;" accesskey="&charsetshiftJIS.accesskey;" oncommand="EditorSetDocumentCharacterSet('Shift_JIS');"/>
<menuitem value="&dcharJapanEucCmd.label;" accesskey="&charsetJapaneseEUC.accesskey;" oncommand="EditorSetDocumentCharacterSet('EUC-JP');"/>
<menuseparator />
<menuitem value="&dcharTradChiBigCmd.label;" accesskey="&charsetChineseBig5.accesskey;" oncommand="EditorSetDocumentCharacterSet('Big5');"/>
<menuitem value="&dcharTriChiEucCmd.label;" accesskey="&charsetChineseEUC.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-euc-tw');"/>
<menuitem value="&dcharSimpChiGbCmd.label;" accesskey="&charsetChineseSimplified.accesskey;" oncommand="EditorSetDocumentCharacterSet('GB2312');"/>
<menuseparator />
<menuitem value="&dcharKoreanCmd.label;" accesskey="&charsetKorean.accesskey;" oncommand="EditorSetDocumentCharacterSet('EUC-KR');"/>
<menuseparator />
<menuitem value="&dcharUtf7Cmd.label;" accesskey="&charsetUTF7.accesskey;" oncommand="EditorSetDocumentCharacterSet('UTF-7');"/>
<menuitem value="&dcharUtf8Cmd.label;" accesskey="&charsetUTF8.accesskey;" oncommand="EditorSetDocumentCharacterSet('UTF-8');"/>
</menupopup>
</menu>
<menu id="charsetMenu2" value="&dcharMenu2.label;" accesskey="&viewcharsetmenu2.accesskey;">
<menupopup>
<menuitem value="&dcharRusCmd.label;" accesskey="&charsetRussian.accesskey;" oncommand="EditorSetDocumentCharacterSet('KOI8-R');"/>
<menuitem value="&dcharIsoCyrCmd.label;" accesskey="&charsetISOCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-5');"/>
<menuitem value="&dcharWinCyrCmd.label;" accesskey="&charsetWinCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1251');"/>
<menuitem value="&dcharEcmaCyrCmd.label;" accesskey="&charsetECMACyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-IR-111');"/>
<menuitem value="&dcharDosCyrCmd.label;" accesskey="&charsetDOSCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('IBM866');"/>
<menuitem value="&dcharMacCyrCmd.label;" accesskey="&charsetMacCyrillic.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-cyrillic');"/>
<menuitem value="&dcharUkrCmd.label;" accesskey="&charsetUkrainian.accesskey;" oncommand="EditorSetDocumentCharacterSet('KOI8-U');"/>
<menuitem value="&dcharMacUkrCmd.label;" accesskey="&charsetMacUkrainian.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-ukrainian');"/>
</menupopup>
</menu>
<menu id="charsetMenu3" value="&dcharMenu3.label;" accesskey="&viewcharsetmenu3.accesskey;">
<menupopup>
<menuitem value="&dcharWinVietCmd.label;" accesskey="&charsetWinVietnamese.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1258');"/>
<menuitem value="&dcharVietTcnCmd.label;" accesskey="&charsetVietnameseTCN.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-viet-tcvn5712');"/>
<menuitem value="&dcharVietViCmd.label;" accesskey="&charsetVietnameseVIS.accesskey;" oncommand="EditorSetDocumentCharacterSet('VISCII');"/>
<menuitem value="&dcharVieVpCmd.label;" accesskey="&charsetVietnameseVPS.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-viet-vps');"/>
<menuseparator />
<menuitem value="&dcharThaiCmd.label;" accesskey="&charsetThai.accesskey;" oncommand="EditorSetDocumentCharacterSet('TIS-620');"/>
<menuseparator />
<menuitem value="&dcharArmCmd.label;" accesskey="&charsetArmenian.accesskey;" oncommand="EditorSetDocumentCharacterSet('ARMSCII-8');"/>
<!--
<menuseparator />
<menuseparator />
<menuitem value="&dcharIso6Cmd.label;" accesskey="&charsetArabic.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-6');"/>
<menuitem value="&dcharCp1256Cmd.label;" accesskey="&charsetWinArabic.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1256');"/>
<menuseparator />
<menuitem value="&dcharIso8Cmd.label;" accesskey="&charsetHebrew.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-8');"/>
<menuitem value="&dcharCp1255Cmd.label;" accesskey="&charsetWinHebrew.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1255');"/>
<menuitem value="&dcharIso6Cmd.label;" accesskey="&charsetArabic.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-6');"/>
<menuitem value="&dcharCp1256Cmd.label;" accesskey="&charsetWinArabic.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1256');"/>
<menuseparator />
<menuitem value="&dcharIso8Cmd.label;" accesskey="&charsetHebrew.accesskey;" oncommand="EditorSetDocumentCharacterSet('ISO-8859-8');"/>
<menuitem value="&dcharCp1255Cmd.label;" accesskey="&charsetWinHebrew.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1255');"/>
-->
</menupopup>
</menu>
<menu id="charsetMenu4" value="&dcharMenu4.label;" accesskey="&viewcharsetmenu4.accesskey;">
<menupopup>
<menuitem value="&dcharMacRomCmd.label;" accesskey="&charsetMacRoman.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-roman');"/>
<menuitem value="&dcharMacCenEuroCmd.label;" accesskey="&charsetMacCentralEurope.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-ce');"/>
<menuitem value="&dcharMacTurCmd.label;" accesskey="&charsetMacTurkish.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-turkish');"/>
<menuitem value="&dcharMacCroaCmd.label;" accesskey="&charsetMacCroatian.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-croatian');"/>
<menuitem value="&dcharMacRomanianCmd.label;" accesskey="&charsetMacRomanian.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-romanian');"/>
<menuitem value="&dcharMacIceCmd.label;" accesskey="&charsetMacIcelandic.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-icelandic');"/>
<menuitem value="&dcharMacGreekCmd.label;" accesskey="&charsetMacGreek.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-greek');"/>
</menupopup>
</menu>
<menu id="charsetMenu5" value="&dcharMenu5.label;" accesskey="&viewcharsetmenu4.accesskey;">
<menupopup>
<menuitem value="&dcharWinLat1Cmd.label;" accesskey="&charsetWinLatin1.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1252');"/>
<menuitem value="&dcharWinLat2Cmd.label;" accesskey="&charsetWinLatin2.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1250');"/>
<menuitem value="&dcharWinLat5Cmd.label;" accesskey="&charsetWinLatin5.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1254');"/>
<menuitem value="&dcharWinBalRimCmd.label;" accesskey="&charsetWinBaltic.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1257');"/>
<menuitem value="&dcharWinGreekCmd.label;" accesskey="&charsetWinGreek.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1253');"/>
</menupopup>
</menu>
</menupopup>
</menu>
<menu id="charsetMenu4" value="&dcharMenu4.label;" accesskey="&viewcharsetmenu4.accesskey;">
<menupopup>
<menuitem value="&dcharMacRomCmd.label;" accesskey="&charsetMacRoman.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-roman');"/>
<menuitem value="&dcharMacCenEuroCmd.label;" accesskey="&charsetMacCentralEurope.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-ce');"/>
<menuitem value="&dcharMacTurCmd.label;" accesskey="&charsetMacTurkish.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-turkish');"/>
<menuitem value="&dcharMacCroaCmd.label;" accesskey="&charsetMacCroatian.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-croatian');"/>
<menuitem value="&dcharMacRomanianCmd.label;" accesskey="&charsetMacRomanian.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-romanian');"/>
<menuitem value="&dcharMacIceCmd.label;" accesskey="&charsetMacIcelandic.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-icelandic');"/>
<menuitem value="&dcharMacGreekCmd.label;" accesskey="&charsetMacGreek.accesskey;" oncommand="EditorSetDocumentCharacterSet('x-mac-greek');"/>
</menupopup>
</menu>
<menu id="charsetMenu5" value="&dcharMenu5.label;" accesskey="&viewcharsetmenu4.accesskey;">
<menupopup>
<menuitem value="&dcharWinLat1Cmd.label;" accesskey="&charsetWinLatin1.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1252');"/>
<menuitem value="&dcharWinLat2Cmd.label;" accesskey="&charsetWinLatin2.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1250');"/>
<menuitem value="&dcharWinLat5Cmd.label;" accesskey="&charsetWinLatin5.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1254');"/>
<menuitem value="&dcharWinBalRimCmd.label;" accesskey="&charsetWinBaltic.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1257');"/>
<menuitem value="&dcharWinGreekCmd.label;" accesskey="&charsetWinGreek.accesskey;" oncommand="EditorSetDocumentCharacterSet('windows-1253');"/>
</menupopup>
</menu>
<!-- Insert menu -->
<menu id="insertMenu" value="&insertMenu.label;" accesskey="&insertmenu.accesskey;">
<menu id="insertMenu" value="&insertMenu.label;" accesskey="&insertmenu.accesskey;">
<menupopup>
<menuitem accesskey="&insertlink.accesskey;" observes="Editor:InsertLink"/>
<menuitem accesskey="&insertanchor.accesskey;" observes="Editor:InsertAnchor"/>
@@ -365,9 +364,9 @@
<menuitem accesskey="&insertlinebreak.accesskey;" disabled="true" observes="Editor:InsertBreak"/>
<menuitem accesskey="&insertbreak.accesskey;" disabled="true" observes="Editor:InsertBreakAll"/>
</menupopup>
</menu>
</menu>
<!-- Format Menu -->
<!-- Format Menu -->
<menupopup id="formatMenuPopup" oncreate="EditorInitFormatMenu()">
<!-- Font face submenu -->
<menu id="fontFaceMenu" value="&fontfaceMenu.label;"
@@ -396,8 +395,8 @@
accesskey="&formatsizemenu.accesskey;"
position="2">
<menupopup>
<menuitem value="&decreaseFontSize.label;" accesskey="&decreasefontsize.accesskey;" oncommand="EditorDecreaseFontSize()"/>
<menuitem value="&increaseFontSize.label;" accesskey="&increasefontsize.accesskey;" oncommand="EditorIncreaseFontSize()"/>
<menuitem value="&decreaseFontSize.label;" accesskey="&decreasefontsize.accesskey;" oncommand="EditorDecreaseFontSize()" key="decreasefontsizekb"/>
<menuitem value="&increaseFontSize.label;" accesskey="&increasefontsize.accesskey;" oncommand="EditorIncreaseFontSize()" key="increasefontsizekb"/>
<menuseparator/>
<menuitem value="&size-xx-smallCmd.label;" accesskey="&size-xx-small.accesskey;" oncommand="EditorSetFontSize('xx-small')"/>
<menuitem value="&size-x-smallCmd.label;" accesskey="&size-x-small.accesskey;" oncommand="EditorSetFontSize('x-small')"/>
@@ -424,41 +423,68 @@
</menupopup>
</menu>
<!-- TODO: REPLACE WITH COLORPICKER -->
<!-- Font color submenu -->
<menu id="fontColorMenu" value="&fontColorMenu.label;"
accesskey="&formatcolormenu.accesskey;"
position="4">
<menupopup>
<menuitem value="&colorBlackCmd.label;" accesskey="&colorblack.accesskey;" oncommand="EditorSetFontColor('black')"/>
<menuitem value="&colorGrayCmd.label;" accesskey="&colorgray.accesskey;" oncommand="EditorSetFontColor('gray')"/>
<menuitem value="&colorSilverCmd.label;" accesskey="&colorsilver.accesskey;" oncommand="EditorSetFontColor('silver')"/>
<menuitem value="&colorWhiteCmd.label;" accesskey="&colorwhite.accesskey;" oncommand="EditorSetFontColor('white')"/>
<menuitem value="&colorRedCmd.label;" accesskey="&colorred.accesskey;" oncommand="EditorSetFontColor('red')"/>
<menuitem value="&colorBlueCmd.label;" accesskey="&colorblue.accesskey;" oncommand="EditorSetFontColor('blue')"/>
<menuitem value="&colorGreenCmd.label;" accesskey="&colorgreen.accesskey;" oncommand="EditorSetFontColor('green')"/>
<menuitem value="&colorCyanCmd.label;" accesskey="&colorcyan.accesskey;" oncommand="EditorSetFontColor('cyan')"/>
<menuitem value="&colorYellowCmd.label;" accesskey="&coloryellow.accesskey;" oncommand="EditorSetFontColor('yellow')"/>
<menuitem value="&colorMagentaCmd.label;" accesskey="&colormagenta.accesskey;" oncommand="EditorSetFontColor('magenta')"/>
</menupopup>
<menupopup>
<menuitem value="&colorBlackCmd.label;" accesskey="&colorblack.accesskey;" oncommand="EditorSetFontColor('black')"/>
<menuitem value="&colorGrayCmd.label;" accesskey="&colorgray.accesskey;" oncommand="EditorSetFontColor('gray')"/>
<menuitem value="&colorSilverCmd.label;" accesskey="&colorsilver.accesskey;" oncommand="EditorSetFontColor('silver')"/>
<menuitem value="&colorWhiteCmd.label;" accesskey="&colorwhite.accesskey;" oncommand="EditorSetFontColor('white')"/>
<menuitem value="&colorRedCmd.label;" accesskey="&colorred.accesskey;" oncommand="EditorSetFontColor('red')"/>
<menuitem value="&colorBlueCmd.label;" accesskey="&colorblue.accesskey;" oncommand="EditorSetFontColor('blue')"/>
<menuitem value="&colorGreenCmd.label;" accesskey="&colorgreen.accesskey;" oncommand="EditorSetFontColor('green')"/>
<menuitem value="&colorCyanCmd.label;" accesskey="&colorcyan.accesskey;" oncommand="EditorSetFontColor('cyan')"/>
<menuitem value="&colorYellowCmd.label;" accesskey="&coloryellow.accesskey;" oncommand="EditorSetFontColor('yellow')"/>
<menuitem value="&colorMagentaCmd.label;" accesskey="&colormagenta.accesskey;" oncommand="EditorSetFontColor('magenta')"/>
</menupopup>
</menu>
<!-- Background color submenu -->
<menu id="backgroundColorMenu" value="&backgroundColorMenu.label;"
<!-- Background color submenu. "value" is set in InitFormatMenu() -->
<menu id="backgroundColorMenu"
accesskey="&formatbkgdcolormenu.accesskey;"
position="5">
<menupopup>
<menuitem value="&colorBlackCmd.label;" accesskey="&colorblack.accesskey;" oncommand="EditorSetBackgroundColor('black')"/>
<menuitem value="&colorGrayCmd.label;" accesskey="&colorgray.accesskey;" oncommand="EditorSetBackgroundColor('gray')"/>
<menuitem value="&colorSilverCmd.label;" accesskey="&colorsilver.accesskey;" oncommand="EditorSetBackgroundColor('silver')"/>
<menuitem value="&colorWhiteCmd.label;" accesskey="&colorwhite.accesskey;" oncommand="EditorSetBackgroundColor('white')"/>
<menuitem value="&colorRedCmd.label;" accesskey="&colorred.accesskey;" oncommand="EditorSetBackgroundColor('red')"/>
<menuitem value="&colorBlueCmd.label;" accesskey="&colorblue.accesskey;" oncommand="EditorSetBackgroundColor('blue')"/>
<menuitem value="&colorGreenCmd.label;" accesskey="&colorgreen.accesskey;" oncommand="EditorSetBackgroundColor('green')"/>
<menuitem value="&colorCyanCmd.label;" accesskey="&colorcyan.accesskey;" oncommand="EditorSetBackgroundColor('cyan')"/>
<menuitem value="&colorYellowCmd.label;" accesskey="&coloryellow.accesskey;" oncommand="EditorSetBackgroundColor('yellow')"/>
<menuitem value="&colorMagentaCmd.label;" accesskey="&colormagenta.accesskey;" oncommand="EditorSetBackgroundColor('magenta')"/>
</menupopup>
</menu>
<!-- Font color submenu
THIS WORKS ONLY IN Windows/Linux (use arbitrary XUL in submenu)
<menu id="fontColorMenu" value="&fontColorMenu.label;"
accesskey="&formatcolormenu.accesskey;"
position="4">
<menupopup>
<colorpicker id="menuTextCP" palettename="standard"
onclick="EditorSelectTextColor('menuTextCP',null);"/>
<menuitem value="&colorPicker.default.label;"
accesskey="&colorPicker.default.accesskey;"
oncommand="EditorRemoveTextColor(null)"/>
</menupopup>
</menu>
<menu id="backgroundColorMenu"
accesskey="&formatbkgdcolormenu.accesskey;"
position="5">
<menupopup>
<menuitem value="&colorBlackCmd.label;" accesskey="&colorblack.accesskey;" oncommand="EditorSetBackgroundColor('black')"/>
<menuitem value="&colorGrayCmd.label;" accesskey="&colorgray.accesskey;" oncommand="EditorSetBackgroundColor('gray')"/>
<menuitem value="&colorSilverCmd.label;" accesskey="&colorsilver.accesskey;" oncommand="EditorSetBackgroundColor('silver')"/>
<menuitem value="&colorWhiteCmd.label;" accesskey="&colorwhite.accesskey;" oncommand="EditorSetBackgroundColor('white')"/>
<menuitem value="&colorRedCmd.label;" accesskey="&colorred.accesskey;" oncommand="EditorSetBackgroundColor('red')"/>
<menuitem value="&colorBlueCmd.label;" accesskey="&colorblue.accesskey;" oncommand="EditorSetBackgroundColor('blue')"/>
<menuitem value="&colorGreenCmd.label;" accesskey="&colorgreen.accesskey;" oncommand="EditorSetBackgroundColor('green')"/>
<menuitem value="&colorCyanCmd.label;" accesskey="&colorcyan.accesskey;" oncommand="EditorSetBackgroundColor('cyan')"/>
<menuitem value="&colorYellowCmd.label;" accesskey="&coloryellow.accesskey;" oncommand="EditorSetBackgroundColor('yellow')"/>
<menuitem value="&colorMagentaCmd.label;" accesskey="&colormagenta.accesskey;" oncommand="EditorSetBackgroundColor('magenta')"/>
</menupopup>
<menupopup>
<colorpicker id="menuBackCP" palettename="standard"
onclick="EditorSelectBackColor('menuBackCP',null);"/>
<menuitem value="&colorPicker.default.label;"
accesskey="&colorPicker.default.accesskey;"
oncommand="EditorRemoveBackColor(null)"/>
</menupopup>
</menu>
-->
<menuitem id="removeAllStylesMenuitem" value="&removeAllStylesCmd.label;"
accesskey="&formatremovestyles.accesskey;" key="removestyleskb"
@@ -503,12 +529,23 @@
accesskey="&formatlistmenu.accesskey;"
oncommand="EditorListProperties()"
position="11"/>
<menuseparator position="12"/>
<menu id="alignMenu" value="&alignMenu.label;"
accesskey="&formatalignmenu.accesskey;"
position="12">
<!-- Align submenu -->
<menupopup>
<menuitem value="&alignLeft.label;" accesskey="&alignleft.accesskey;" oncommand="EditorAlign('left')"/>
<menuitem value="&alignCenter.label;" accesskey="&aligncenter.accesskey;" oncommand="EditorAlign('center')"/>
<menuitem value="&alignRight.label;" accesskey="&alignright.accesskey;" oncommand="EditorAlign('right')"/>
<menuitem value="&alignJustify.label;" accesskey="&alignjustify.accesskey;" oncommand="EditorAlign('justify')"/>
</menupopup>
</menu>
<menuseparator position="13"/>
<!-- Stylesheet submenu -->
<menu id="stylesheetMenu" value="&stylesheetMenu.label;"
accesskey="&formatstylesheetmenu.accesskey;"
position="13" hidden="true" disabled="true">
position="14" hidden="true" disabled="true">
<menupopup>
<menuitem value="&stylesheetOldstyleCmd.label;" accesskey="&ssoldstyle.accesskey;" oncommand="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Oldstyle')"/>
<menuitem value="&stylesheetModernistCmd.label;" accesskey="&ssmodernist.accesskey;" oncommand="EditorApplyStyleSheet('http://www.w3.org/StyleSheets/Core/Modernist')"/>
@@ -519,17 +556,6 @@
</menupopup>
</menu>
<!-- Align submenu -->
<menu id="alignMenu" value="&alignMenu.label;"
accesskey="&formatalignmenu.accesskey;"
position="14">
<menupopup>
<menuitem value="&alignLeft.label;" accesskey="&alignleft.accesskey;" oncommand="EditorAlign('left')"/>
<menuitem value="&alignCenter.label;" accesskey="&aligncenter.accesskey;" oncommand="EditorAlign('center')"/>
<menuitem value="&alignRight.label;" accesskey="&alignright.accesskey;" oncommand="EditorAlign('right')"/>
<menuitem value="&alignJustify.label;" accesskey="&alignjustify.accesskey;" oncommand="EditorAlign('justify')"/>
</menupopup>
</menu>
<menuseparator position="15"/>
<menuitem id="increaseIndent" value="&increaseIndent.label;"
@@ -601,16 +627,16 @@
<popup id="TextColorPopup" popupanchor="bottomleft">
<titledbutton id="TextColorCaption" class="color-caption" value="&textColorCaption.label;" flex="1"/>
<!-- TODO: Add "Last color picked" button and text -->
<colorpicker id="TextColorPicker" palettename="standard" onclick="EditorSelectTextColor('TextColorPicker','TextColorPopupButton'); parentNode.closePopup();"/>
<titledbutton class="push" value="&formatToolbar.colorPicker.default.label;" onclick="EditorRemoveTextColor('TextColorPopupButton'); parentNode.closePopup();"/>
<colorpicker id="TextColorPicker" palettename="standard" onclick="EditorSelectTextColor('TextColorPicker','TextColorPopupButton');"/>
<titledbutton class="push" value="&colorPicker.default.label;" onclick="EditorRemoveTextColor('TextColorPopupButton');"/>
</popup>
<popup id="BackColorPopup" popupanchor="bottomleft" oncreate="InitBackColorPopup()">
<!-- Text is filled in at runtime according to what background element will be set -->
<titledbutton id="BackColorCaption" class="color-caption" value="Background Color" flex="1"/>
<!-- TODO: Add "Last color picked" button and text -->
<colorpicker id="BackColorPicker" palettename="standard" onclick="EditorSelectBackColor('BackColorPicker','BackColorPopupButton'); parentNode.closePopup();"/>
<titledbutton class="push" value="&formatToolbar.colorPicker.default.label;" onclick="EditorRemoveBackColor('BackColorPopupButton'); parentNode.closePopup();"/>
<colorpicker id="BackColorPicker" palettename="standard" onclick="EditorSelectBackColor('BackColorPicker','BackColorPopupButton');"/>
<titledbutton class="push" value="&colorPicker.default.label;" onclick="EditorRemoveBackColor('BackColorPopupButton');"/>
</popup>
<menupopup id="AlignmentPopup">
@@ -652,9 +678,9 @@
<titledbutton id="newButton" class="button28" observes="cmd_newEditor" value="&newMenu.label;" />
<titledbutton id="openButton" class="button28" observes="Editor:Open" value="&openToolbarCmd.label;"/>
<titledbutton id="saveButton" class="button28" observes="Editor:Save"/>
<titledbutton id="previewButton" class="button28" observes="Editor:Preview"/>
<titledbutton id="previewButton" class="button28" observes="Editor:Preview" value="&previewToolbarCmd.label;"/>
<titledbutton id="printButton" class="other28" observes="Editor:Print" value="&printToolbarCmd.label;"/>
<titledbutton id="findButton" class="other28" observes="cmd_find" value="&findToolbarCmd.label;"/>
<titledbutton id="findButton" class="other28" observes="cmd_find" value="&findToolbarCmd.label;"/>
<titledbutton id="spellingButton" class="other28" value="&spellToolbarCmd.label;" onclick="CheckSpelling()"/>
<titledbutton id="imageButton" class="other28" value="&imageToolbarCmd.label;" onclick="EditorInsertOrEditImage()"/>
@@ -738,7 +764,7 @@
<!-- DEBUG only -->
<menu id="debugMenu" value="&debugMenu.label;" hidden="true">
<menu id="debugMenu" value="&debugMenu.label;">
<menupopup>
<menuitem value="&newEditorTestPage.label;" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
<menuitem value="&textEditorCmd.label;" oncommand="EditorNewPlaintext();" />

View File

@@ -70,12 +70,16 @@ Pixels=pixels
Percent=percent
PercentOfCell=% of cell
PercentOfWindow=% of window
PercentOfTable=% of table
untitled=untitled
NoNamedAnchors=(No named anchors in this page)
NoHeadings=(No headings without anchors)
#These next 3 must be compatable with "formatbkgdcolormenu.accesskey" in editorOverlay.dtd
#Should use a letter in the word "background"
PageBackColor=Page Background Color
CellBackColor=Cell Background Color
TableBackColor=Table Background Color
LastPickedColor=Last picked color
Table=Table
TableCell=Table Cell

View File

@@ -25,10 +25,10 @@
<!-- File menu items -->
<!ENTITY fileMenu.label "File">
<!ENTITY filemenu.accesskey "f">
<!ENTITY newBlankPage.label "New Blank Page">
<!ENTITY newBlankPage.accesskey "b" >
<!ENTITY newBlankPageCmd.label "New Blank Page">
<!ENTITY newBlankPage.accesskey "n" >
<!ENTITY newMenu.label "New">
<!ENTITY newMenu.accesskey "n">
<!ENTITY newMenu.accesskey "e">
<!ENTITY openFileCmd.label "Open File...">
<!ENTITY fileopen.accesskey "o">
<!ENTITY fileopen.keybinding "o">
@@ -40,12 +40,12 @@
<!ENTITY filesave.keybinding "s">
<!ENTITY saveAsCmd.label "Save As...">
<!ENTITY filesaveas.accesskey "a">
<!ENTITY previewCmd.label "Preview">
<!ENTITY filepreview.accesskey "v">
<!ENTITY previewCmd.label "Preview in Browser">
<!ENTITY filepreview.accesskey "b">
<!ENTITY printSetupCmd.label "Print Setup...">
<!ENTITY fileprintsetup.accesskey "t">
<!ENTITY printPreviewCmd.label "Print Preview">
<!ENTITY fileprintpreview.accesskey "r">
<!ENTITY fileprintpreview.accesskey "v">
<!ENTITY printCmd.label "Print...">
<!ENTITY printButtonCmd.label "Print...">
<!ENTITY fileprint.accesskey "p">
@@ -245,7 +245,7 @@
<!ENTITY formatmenu.accesskey "o">
<!-- Font Face SubMenu -->
<!ENTITY fontfaceMenu.label "Font Face">
<!ENTITY fontfaceMenu.label "Font">
<!ENTITY formatfontmenu.accesskey "f">
<!ENTITY defaultVariableWidthCmd.label "Variable Width">
<!ENTITY fontvarwidth.accesskey "v">
@@ -284,7 +284,7 @@
<!ENTITY size-xx-large.accesskey "e">
<!-- Font Style SubMenu -->
<!ENTITY fontStyleMenu.label "Style">
<!ENTITY fontStyleMenu.label "Text Style">
<!ENTITY formatstylemenu.accesskey "s">
<!ENTITY styleBoldCmd.label "Bold">
<!ENTITY stylebold.accesskey "b">
@@ -326,17 +326,18 @@
<!ENTITY coloryellow.accesskey "y">
<!ENTITY colorMagentaCmd.label "Magenta">
<!ENTITY colormagenta.accesskey "m">
<!ENTITY backgroundColorMenu.label "Background Color">
<!--
Menu item text for "[Page|Table|Cell] Background color" is filled from
editor.properties strings, so accesskey should be compatable with those
-->
<!ENTITY formatbkgdcolormenu.accesskey "b">
<!ENTITY removeAllStylesCmd.label "Remove All Styles">
<!ENTITY removeAllStylesCmd.label "Remove All Text Styles">
<!ENTITY formatremovestyles.accesskey "r">
<!ENTITY formatremovestyles.keybinding "k">
<!ENTITY removeLinksCmd.label "Remove Link(s)">
<!ENTITY formatremovelinks.accesskey "m">
<!ENTITY formatindent.keybinding "=">
<!ENTITY formatoutdent.keybinding "-">
<!ENTITY headingMenu.label "Heading">
<!ENTITY formatheadingmenu.accesskey "h">
<!ENTITY headingNormalCmd.label "Normal">
@@ -374,7 +375,7 @@
<!ENTITY paragraphdesc.accesskey "d">
<!-- List menu items -->
<!ENTITY listProps.label "List Properties...">
<!ENTITY listProps.label "List...">
<!ENTITY formatlistmenu.accesskey "l">
<!-- Style Sheet submenu -->
@@ -406,10 +407,10 @@
<!ENTITY alignjustify.accesskey "j">
<!ENTITY increaseIndent.label "Increase indent">
<!ENTITY increaseindent.accesskey "n">
<!ENTITY increaseindent.accesskey "i">
<!ENTITY increaseindentkb "=">
<!ENTITY decreaseIndent.label "Decrease indent">
<!ENTITY decreaseindent.accesskey "e">
<!ENTITY decreaseindent.accesskey "d">
<!ENTITY decreaseindentkb "-">
<!ENTITY pageProperties.label "Page Title and Properties...">
@@ -491,6 +492,7 @@
<!-- toolbar-only items -->
<!ENTITY openToolbarCmd.label "Open">
<!ENTITY previewToolbarCmd.label "Preview">
<!ENTITY printToolbarCmd.label "Print">
<!ENTITY findToolbarCmd.label "Find">
<!ENTITY linkToolbarCmd.label "Link">
@@ -510,7 +512,10 @@
<!ENTITY formatToolbar.boldChar "B">
<!ENTITY formatToolbar.italicChar "I">
<!ENTITY formatToolbar.underlineChar "U">
<!ENTITY formatToolbar.colorPicker.default.label "Don't Specify Color">
<!-- Used with color pickers in Format toolbar and Format Menu -->
<!ENTITY colorPicker.default.label "Reader's default color">
<!ENTITY colorPicker.default.accesskey "r">
<!ENTITY tempNotification.label "[status message]">
<!ENTITY tempDoneLoading.label "[Document loading message]">

View File

@@ -121,8 +121,11 @@ select.toolbar {
}
box#DisplayModeBar titledbutton.DisplayModeButton {
border: 1px solid transparent;
border-left: 1px solid darkgray;
-moz-border-radius: 0px 0px 8px 8px;
border-top: 1px solid #CCCCCC;
border-bottom: 1px solid #666666;
border-left: 1px solid white;
border-right: 1px solid #666666;
padding: 0px 4px 0px 4px;
margin: 0px;
color: black;
@@ -131,10 +134,6 @@ box#DisplayModeBar titledbutton.DisplayModeButton {
box#DisplayModeBar titledbutton.DisplayModeButton:hover {
border: 1px solid white;
/* Alternate hover style: change background
color: white;
background-color: #66AAAA;
*/
}
box#DisplayModeBar titledbutton.DisplayModeButton:active {
@@ -142,20 +141,11 @@ box#DisplayModeBar titledbutton.DisplayModeButton:active {
}
box#DisplayModeBar titledbutton.DisplayModeButton[selected="1"] {
border: 1px outset white;
padding: 0px 4px 0px 4px;
margin: -2px 0px 0px 0px;
font-weight: bold;
}
box#DisplayModeBar titledbutton.DisplayModeButton[selected="1"]:hover {
border: 1px solid white;
/* Alternate hover style: change background
background-color: #66AAAA;
color: white;
*/
}
box#DisplayModeBar titledbutton.DisplayModeButton[selected="1"]:active {
padding: 1px 5px -1px 3px;
}
@@ -334,7 +324,7 @@ titledbutton#BackColorPopupButton {
margin: 0px;
position: relative;
/* Position lower right */
top: 9px;
top: 8px;
left: 12px;
/* TEMP: Set color here. TODO: Set color from page */

View File

@@ -146,7 +146,6 @@ function ValidateNumberString(value, minValue, maxValue)
function ShowInputErrorMessage(message)
{
dump("ShowInputErrorMessage:"+message+"[end]\n");
window.openDialog("chrome://editor/content/EdMessage.xul", "_blank", "chrome,close,titlebar,modal", "", message, "Input Error");
}
@@ -225,7 +224,6 @@ function SetElementEnabledByID( elementID, doEnable )
element = document.getElementById(elementID);
if ( element )
{
//dump("*** SetElementEnabledByID: Element="+element+" ID="+elementID+"\n");
if ( doEnable )
{
element.removeAttribute( "disabled" );
@@ -269,27 +267,38 @@ function SetClassEnabledByID( elementID, doEnable )
// Get the text appropriate to parent container
// that may be a cell or window
function GetAppropriatePercentString()
function GetAppropriatePercentString(elementForAtt, elementInDoc)
{
var selection = window.editorShell.editorSelection;
if (selection) {
if (editorShell.GetElementOrParentByTagName("td",selection.anchorNode))
return GetString("PercentOfCell");
}
return GetString("PercentOfWindow");
if (elementForAtt.nodeName == "TD" || elementForAtt.nodeName == "TH")
return GetString("PercentOfTable");
//TEMP: UNTIL InitPixelOrPercentCombobox() has elementInDoc param:
if(elementForAtt.nodeName == "TABLE")
return GetString("PercentOfWindow");
// Check if element is within a cell
if(editorShell.GetElementOrParentByTagName("td",elementInDoc))
return GetString("PercentOfCell");
else
return GetString("PercentOfWindow");
}
// TODO: MODIFY THIS TO PASS IN 2 ELEMENTS: ADD elementInDoc
// 1st is a temporary element containing current attributes,
// 2nd is element in document needed to check parent context for "percent of..." string
// Returns the value for the "size" input element ("%" is stripped)
// Appends option elements with the correct strings to the select widget
function InitPixelOrPercentCombobox(element, attribute, selectID)
function InitPixelOrPercentCombobox(elementForAtt, attribute, selectID)
{
size = element.getAttribute(attribute);
size = elementForAtt.getAttribute(attribute);
select = document.getElementById(selectID);
if (select) {
ClearList(select);
AppendStringToList(select,GetString("Pixels"));
AppendStringToList(select,GetAppropriatePercentString());
// TEMPORARY: THIS WILL ALLOW US TO NOT HAVE TO CHANGE CALLS
// FROM IMAGE AN HLINE DIAOLGS -- USE SELECTION ANCHOR NODE
AppendStringToList(select,GetAppropriatePercentString(elementForAtt,window.editorShell.editorSelection.anchorNode));
}
// Search for a "%" character
@@ -323,7 +332,7 @@ function InitPixelOrPercentPopupButton(element, attribute, buttonID)
size = size.substr(0, percentIndex);
if (btn)
btn.setAttribute("value",GetAppropriatePercentString());
btn.setAttribute("value",GetAppropriatePercentString(element));
} else {
if (btn)
btn.setAttribute("value",GetString("Pixels"));
@@ -375,8 +384,10 @@ function forceInteger(elementID)
var stringIn = editField.value;
if (stringIn && stringIn.length > 0)
{
stringIn = stringIn.replace(/\D+/g,"");
if (!stringIn) stringIn = "";
// Strip out all nonnumeric characters
editField.value = stringIn.replace(/\D+/g,"");
editField.value = stringIn;
// we hope to remove the following line for blur() once xp widgets land
// cmanske (9/15) testing this now that GFX ender widget is active
@@ -474,10 +485,14 @@ function getColor(ColorPickerID)
if (colorPicker)
{
// Extract color from colorPicker and assign to colorWell.
color = colorPicker.getAttribute('color');
color = colorPicker.getAttribute("color");
if (color && color == "")
return null;
// Clear color so next if it's called again before
// color picker is actually used, we dedect the "don't set color" state
colorPicker.setAttribute("color","");
}
return color;
}
@@ -491,6 +506,9 @@ function setColorWell(ColorWellID, color)
// Don't set color (use default)
// Trigger change to not show color swatch
colorWell.setAttribute("default","true");
// Style in CSS sets "background-color",
// but color won't clear unless we do this:
colorWell.removeAttribute("style");
}
else
{

View File

@@ -28,10 +28,10 @@
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<box id="AdvancedEdit" align="vertical" flex="100%">
<box align="horizontal" flex="100%" style="margin-top: 0.2em">
<box id="AdvancedEdit" orient="vertical" flex="1">
<box flex="1" style="margin-top: 0.2em" autostretch="never">
<!-- This will right-align the button -->
<spring flex="100%"/>
<spring flex="1"/>
<titledbutton id="AdvancedEditButton" class="push dialog" onclick="onAdvancedEdit()" value="&AdvancedEditButton.label;"/>
</box>
<html:div class="separator" align="horizontal"/>
@@ -46,6 +46,7 @@
class = "push dialog"
onclick = "onAdvancedEdit()"
value = "&AdvancedEditButton.label;"/>
<titledbutton
id = "AdvancedEditButton3"
class = "push dialog"

View File

@@ -44,28 +44,28 @@
<broadcaster id="args" value=""/>
<keyset id="keyset"/>
<box valign="middle">
<box valign="middle" autostretch="never">
<text class="right" align="right" value="&numRowsEditField.label;"/>
<html:input type="text" id="rows" maxlength="4" size="4"
onkeyup="forceInteger('rows')" />
</box>
<spring class="spacer"/>
<box valign="middle">
<box valign="middle" autostretch="never">
<text class="right" align="right" value="&numColumnsEditField.label;"/>
<html:input type="text" id="columns" maxlength="4" size="4"
onkeyup="forceInteger('columns')" />
</box>
<spring class="spacer"/>
<box valign="middle">
<box valign="middle" autostretch="never">
<text class="right" align="right" value="&widthEditField.label;"/>
<html:input type="text" id="width" size="4" maxlength="4"
onkeyup="forceInteger('width')" />
<html:div><html:input type="text" id="width" size="4" maxlength="4"
onkeyup="forceInteger('width')" /></html:div>
<spring class="spacer"/>
<html:select id="pixelOrPercentSelect" size="1"/>
<!-- option elements are appended by JS -->
</box>
<spring class="spacer"/>
<box valign="middle">
<box valign="middle" autostretch="never">
<text class="right" align="right" value="&borderEditField.label;"/>
<html:input type="text" id="borderInput" size="4" maxlength="4"
onkeyup="forceInteger('borderInput')" />

View File

@@ -237,7 +237,9 @@ function chooseFile()
function RemoveLink()
{
// Simple clear the input field!
// BUG: This doesn't clear the input field!
dialog.hrefInput.value = "";
dialog.hrefInput.focus();
}
function FillListboxes()

View File

@@ -22,7 +22,6 @@
//Cancel() is in EdDialogCommon.js
var insertNew = true;
var tagname = "TAG NAME"
var ListTypeList;
var BulletStyleList;
@@ -32,7 +31,9 @@ var StartingNumberLabel;
var BulletStyleIndex = 0;
var NumberStyleIndex = 0;
var ListElement = 0;
var originalListType = "";
var ListType = "";
var MixedListSelection = false;
var AdvancedEditButton;
// dialog initialization code
@@ -51,7 +52,20 @@ function Startup()
AdvancedEditButton = document.getElementById("AdvancedEditButton");
// Try to get an existing list
ListElement = editorShell.GetElementOrParentByTagName("list",null);
// This gets a single list element enclosing the entire selection
ListElement = editorShell.GetSelectedElement("list");
if (!ListElement)
{
// Get the list at the anchor node
ListElement = editorShell.GetElementOrParentByTagName("list", null);
// Remember if we have a list at anchor node, but focus node
// is not in a list or is a different type of list
if (ListElement)
MixedListSelection = true;
}
// The copy to use in AdvancedEdit
if (ListElement)
@@ -61,6 +75,8 @@ function Startup()
InitDialog();
originalListType = ListType;
ListTypeList.focus();
}
@@ -70,7 +86,7 @@ function InitDialog()
ListType = ListElement.nodeName.toLowerCase();
else
ListType = "";
BuildBulletStyleList();
}
@@ -134,17 +150,7 @@ function BuildBulletStyleList()
AdvancedEditButton.removeAttribute("disabled");
if (label)
{
BulletStyleLabel.value = label;
if (BulletStyleLabel.hasChildNodes())
{
//dump("BulletStyleLabel.firstChild: "+BulletStyleLabel.firstChild+"\n");
BulletStyleLabel.removeChild(BulletStyleLabel.firstChild);
}
var textNode = document.createTextNode(label);
BulletStyleLabel.appendChild(textNode);
}
BulletStyleLabel.setAttribute("value",label);
}
function SelectListType()
@@ -251,16 +257,18 @@ function onOK()
// Coalesce into one undo transaction
editorShell.BeginBatchChanges();
// Making a list is tricky!
// First, make the list
editorShell.MakeOrChangeList(ListType);
// Now we need to get ALL of the list nodes in the current selection
// For now, let's get just the one at the anchor
listElement = editorShell.GetElementOrParentByTagName("list",null);
// We may need to create new list element(s)
// or change to a different list type.
if (!ListElement || MixedListSelection || ListType != originalListType)
{
editorShell.MakeOrChangeList(ListType);
// Get the new list created:
//ListElement = editorShell.GetSelectedElement("list");
ListElement = editorShell.GetElementOrParentByTagName(ListType, null);
}
// Set the list attributes
if (listElement)
editorShell.CloneAttributes(listElement, globalElement);
if (ListElement)
editorShell.CloneAttributes(ListElement, globalElement);
editorShell.EndBatchChanges();
return true;

View File

@@ -28,44 +28,45 @@
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorListProperties.dtd">
<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"
<window class="dialog" title="&windowTitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/TR/REC-html40"
onload = "Startup()"
align="vertical">
<!-- Methods common to all editor dialogs -->
<script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
<script language="JavaScript" src="chrome://editor/content/EdListProps.js"/>
<script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
<html:script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
<html:script language="JavaScript" src="chrome://editor/content/EdListProps.js"/>
<html:script language="JavaScript" src="chrome://global/content/dialogOverlay.js" />
<xul:keyset id="keyset"/>
<keyset id="keyset"/>
<broadcaster id="args" value=""/>
<label for="ListType">&ListType.label;</label>
<select class="ComboBox" id="ListType" onchange="SelectListType()">
<option>&none.value;</option>
<option>&bulletList.value;</option>
<option>&numberList.value;</option>
<option>&definitionList.value;</option>
</select>
<xul:spring class="spacer"/>
<text for="ListType" value="&ListType.label;"/>
<html:select class="ComboBox" id="ListType" onchange="SelectListType()">
<html:option>&none.value;</html:option>
<html:option>&bulletList.value;</html:option>
<html:option>&numberList.value;</html:option>
<html:option>&definitionList.value;</html:option>
</html:select>
<spring class="spacer"/>
<!-- message text and list items are set in JS
bulletStyle.label should be identical to string with id=BulletStyle in editor.properties -->
<div id="BulletStyleLabel">&bulletStyle.label;</div>
<select class="ComboBox" id="BulletStyle" style="min-width: 10em" onchange="SelectBulletStyle()"/>
<xul:spring class="spacer"/>
text value should be identical to string with id=BulletStyle in editor.properties
-->
<text id="BulletStyleLabel" value="&bulletStyle.label;"/>
<html:select class="ComboBox" id="BulletStyle" style="min-width: 10em" onchange="SelectBulletStyle()"/>
<spring class="spacer"/>
<xul:box align="horizontal">
<label id="StartingNumberLabel" for="StartingNumber">&startingNumber.label;</label>
<xul:spring class="spacer"/>
<input type="text" id="StartingNumber" size="3" onkeyup="forceInteger('StartingNumber')"/>
<xul:spring/>
</xul:box>
<xul:broadcaster id="args" value=""/>
<box>
<text id="StartingNumberLabel" for="StartingNumber" value="&startingNumber.label;"/>
<spring class="spacer"/>
<html:input type="text" id="StartingNumber" size="3" onkeyup="forceInteger('StartingNumber')"/>
<spring/>
</box>
<!-- from EdDialogOverlay -->
<xul:box id="AdvancedEdit"/>
<box id="AdvancedEdit"/>
<!-- from global dialogOverlay -->
<xul:box id="okCancelButtons"/>
<box id="okCancelButtons"/>
</xul:window>
</window>

View File

@@ -107,8 +107,11 @@ function ValidateData()
nameInput.focus();
return false;
} else {
// Replace spaces with "_" else it causes trouble in URL parsing
// Replace spaces with "_" and strip other characters
// Note: we could use ConvertAndEscape, but then we'd
// have to UnConverAndEscape beforehand - too messy!
name = PrepareStringForURL(name);
if (AnchorNameExists(name)) {
ShowInputErrorMessage(GetString("DuplicateAnchorNameError").replace(/%name%/,name));
nameInput.focus();

View File

@@ -29,8 +29,28 @@ var TabPanel;
var TablePanel;
var CellPanel;
var dialog;
var cellGlobalElement;
var tableGlobalElement
var globalCellElement;
var globalTableElement
var captionElement;
var TablePanel = 0;
var CellPanel = 1;
var currentPanel = TablePanel;
var validatePanel;
var defHAlignIndex = 0; // = left, index=0
var charIndex = 4;
var centerStr = "center"; //Index=1
var rightStr = "right"; // 2
var justifyStr = "justify"; // 3
var charStr = "char"; // 4
var defVAlignIndex = 1; // = middle
var topStr = "top";
var bottomStr = "bottom";
var bgcolor = "bgcolor";
var CellIsHeader = false;
var rowCount = 1;
var colCount = 1;
var error = 0;
// dialog initialization code
function Startup()
@@ -44,9 +64,42 @@ function Startup()
dump("Failed to create dialog object!!!\n");
window.close();
}
// Get dialog widgets - Table Panel
dialog.TableRowsInput = document.getElementById("TableRowsInput");
dialog.TableColumnsInput = document.getElementById("TableColumnsInput");
dialog.TableHeightInput = document.getElementById("TableHeightInput");
dialog.TableHeightUnits = document.getElementById("TableHeightUnits");
dialog.TableWidthInput = document.getElementById("TableWidthInput");
dialog.TableWidthUnits = document.getElementById("TableWidthUnits");
dialog.BorderWidthInput = document.getElementById("BorderWidthInput");
dialog.SpacingInput = document.getElementById("SpacingInput");
dialog.PaddingInput = document.getElementById("PaddingInput");
dialog.TableAlignSelect = document.getElementById("TableAlignSelect");
dialog.CaptionSelect = document.getElementById("CaptionSelect");
dialog.TableInheritColor = document.getElementById("TableInheritColor");
dialog.TableImageInput = document.getElementById("TableImageInput");
// dialog.TableLeaveLocCheck = document.getElementById("TableLeaveLocCheck");
// Cell Panel
dialog.SelectionSelect = document.getElementById("SelectionSelect");
dialog.CellHeightInput = document.getElementById("CellHeightInput");
dialog.CellHeightUnits = document.getElementById("CellHeightUnits");
dialog.CellWidthInput = document.getElementById("CellWidthInput");
dialog.CellWidthUnits = document.getElementById("CellWidthUnits");
dialog.RowSpanInput = document.getElementById("RowSpanInput");
dialog.ColSpanInput = document.getElementById("ColSpanInput");
dialog.CellHAlignSelect = document.getElementById("CellHAlignSelect");
dialog.CellAlignCharInput = document.getElementById("CellAlignCharInput");
dialog.CellVAlignSelect = document.getElementById("CellVAlignSelect");
dialog.HeaderCheck = document.getElementById("HeaderCheck");
dialog.NoWrapCheck = document.getElementById("NoWrapCheck");
dialog.CellInheritColor = document.getElementById("CellInheritColor");
dialog.CellImageInput = document.getElementById("CellImageInput");
// dialog.CellLeaveLocCheck = document.getElementById("CellLeaveLocCheck");
TableElement = editorShell.GetElementOrParentByTagName("table", null);
CellElement = editorShell.GetElementOrParentByTagName("td", null);
// We allow a missing cell -- see below
if(!TableElement)
{
@@ -54,28 +107,21 @@ function Startup()
window.close();
}
var panelName;
TabPanel = document.getElementById("TabPanel");
TablePanel = document.getElementById("TablePanel");
CellPanel = document.getElementById("CellPanel");
var TableTab = document.getElementById("TableTab");
var CellTab = document.getElementById("CellTab");
if (!TabPanel || !TablePanel || !CellPanel || !TableTab || !CellTab)
{
dump("Not all dialog controls were found!!!\n");
window.close;
}
// Starting TabPanel name is passed in
if (window.arguments[1] == "CellPanel") currentPanel = CellPanel;
// Get the starting TabPanel name
var StartPanelName = window.arguments[1];
tableGlobalElement = TableElement.cloneNode(false);
globalTableElement = TableElement.cloneNode(false);
if (CellElement)
cellGlobalElement = CellElement.cloneNode(false);
globalCellElement = CellElement.cloneNode(false);
// Activate the Cell Panel if requested
if (StartPanelName == "CellPanel")
if (currentPanel == CellPanel)
{
// We must have a cell element to start in this panel
if(!CellElement)
@@ -85,19 +131,21 @@ function Startup()
}
//Set index for starting panel on the <tabpanel> element
TabPanel.setAttribute("index", 1);
TabPanel.setAttribute("index", CellPanel);
// Trigger setting of style for the tab widgets
CellTab.setAttribute("selected", "true");
TableTab.removeAttribute("selected");
// Start editing on the cell element
globalElement = cellGlobalElement;
globalElement = globalCellElement;
}
else
{
currentPanel = TablePanel;
// Start editing on the table element
globalElement = cellGlobalElement;
globalElement = globalTableElement;
}
if(!CellElement)
@@ -108,54 +156,427 @@ function Startup()
doSetOKCancel(onOK, null);
// Get widgets
dialog.BorderWidthCheck = document.getElementById("BorderWidthCheck");
dialog.BorderWidthInput = document.getElementById("BorderWidthInput");
// This uses values set on globalElement
// This uses values set on global Elements;
InitDialog();
// SET FOCUS TO FIRST CONTROL
// Should be dialog.TableRowsInput, or
// SelectionSelect in cel panenl,
// but this is disabled for Beta1disabled for Beta1
if (currentPanel == CellPanel)
dialog.CellHeightInput.focus();
else
dialog.TableHeightInput.focus();
}
function InitDialog()
{
dump("Table Editing:InitDialog()\n");
// Get Table attributes
try {
// For some strange reason, we are failing to the "layoutObject" for the table!
rowCount = editorShell.GetTableRowCount(globalTableElement);
dialog.TableRowsInput.value = rowCount;
colCount = editorShell.GetTableColumnCount(tableGlobatlElement);
dialog.TableColumnsInput.value = colCount;
}
catch (ex) {
dump("Failed to get table rows and/or columns count\n");
dialog.TableRowsInput.value = "";
dialog.TableColumnsInput.value = "";
}
dialog.TableHeightInput.value = InitPixelOrPercentCombobox(globalTableElement, "height", "TableHeightUnits");
dialog.TableWidthInput.value = InitPixelOrPercentCombobox(globalTableElement, "width", "TableWidthUnits");
dialog.BorderWidthInput.value = globalTableElement.border;
dialog.SpacingInput.value = globalTableElement.cellSpacing;
dialog.PaddingInput.value = globalTableElement.cellPadding;
//BUG: The align strings are converted: e.g., "center" becomes "Center";
var halign = globalTableElement.align.toLowerCase();
if (halign == centerStr)
dialog.TableAlignSelect.selectedIndex = 1;
else if (halign == bottomStr)
dialog.TableAlignSelect.selectedIndex = 2;
else // Default = left
dialog.TableAlignSelect.selectedIndex = 0;
captionElement = globalTableElement.caption;
dump("Caption Element = "+captionElement+"\n");
var index = 0;
if (captionElement)
{
if(captionElement.vAlign == "top")
index = 1;
else
index = 2;
}
dialog.CaptionSelect.selectedIndex = index;
if (globalTableElement.background)
dialog.TableImageInput.value = globalTableElement.background;
SetColor("tableBackgroundCW", globalTableElement.bgColor);
// Get cell attributes
if (globalCellElement)
{
//TODO: Test if all cells in selection are in a row or column,
// and set dialog.SelectionSelect.selectedIndex appropriately
dialog.CellHeightInput.value = InitPixelOrPercentCombobox(globalCellElement, "height", "CellHeightUnits");
dialog.CellWidthInput.value = InitPixelOrPercentCombobox(globalCellElement, "width", "CellWidthUnits");
//BUG: We don't suppor "rowSpan" or "colSpan" JS attributes?
dump("RowSpan="+globalCellElement.rowSpan+" ColSpan="+globalCellElement.colSpan+"\n");
dialog.RowSpanInput.value = globalCellElement.getAttribute("rowspan");
dialog.ColSpanInput.value = globalCellElement.getAttribute("colspan");
var valign = globalCellElement.vAlign.toLowerCase();
if (valign == topStr)
dialog.CellVAlignSelect.selectedIndex = 0;
else if (valign == bottomStr)
dialog.CellVAlignSelect.selectedIndex = 2;
else // Default = middle
dialog.CellVAlignSelect.selectedIndex = 1;
var halign = globalCellElement.align.toLowerCase();
switch (halign)
{
case centerStr:
dialog.CellHAlignSelect.selectedIndex = 1;
break;
case rightStr:
dialog.CellHAlignSelect.selectedIndex = 2;
break;
case justifyStr:
dialog.CellHAlignSelect.selectedIndex = 3;
break;
case charStr:
var alignChar = globalCellElement.getAttribute(charStr);
if (alignChar && alignChar.length == 1)
{
dialog.CellAlignCharInput.value = alignChar;
dialog.CellHAlignSelect.selectedIndex = 4;
} else {
// "char" align set but no alignment char value
dialog.CellHAlignSelect.selectedIndex = 0;
}
break;
default: // left
dialog.CellHAlignSelect.selectedIndex = 0;
break;
}
// Show/hide extra message to explain "default" case
SelectCellHAlign();
CellIsHeader = (globalCellElement.nodeName == "TH");
dialog.HeaderCheck.checked = CellIsHeader;
dialog.NoWrapCheck.checked = globalCellElement.noWrap;
SetColor("cellBackgroundCW", globalCellElement.bgColor);
if (globalCellElement.background)
dialog.CellImageInput.value = globalCellElement.background;
}
}
//TODO: Should we validate the panel before leaving it? We don't now
function SelectTableTab()
{
globalElement = tableGlobalElement;
globalElement = globalTableElement;
currentPanel = TablePanel;
}
function SelectCellTab()
{
globalElement = cellGlobalElement;
globalElement = globalCellElement;
currentPanel = CellPanel;
}
function SelectCellHAlign()
{
dump("dialog.CellHAlignSelect.selectedIndex ="+dialog.CellHAlignSelect.selectedIndex+"\n");
if (dialog.CellHAlignSelect.selectedIndex == 4)
dialog.CellAlignCharInput.removeAttribute("visibility");
else
dialog.CellAlignCharInput.setAttribute("visibility","hidden");
}
function GetColorAndUpdate(ColorPickerID, ColorWellID, widget)
{
// Close the colorpicker
widget.parentNode.closePopup();
SetColor(ColorWellID, getColor(ColorPickerID));
var color = null;
if (ColorPickerID)
color = getColor(ColorPickerID);
SetColor(ColorWellID, color);
}
function SetColor(ColorWellID, color)
{
// Save the color
if (ColorWellID == "cellBackgroundCW")
dialog.cellBackgroundColor = color;
{
if (color)
{
globalCellElement.setAttribute(bgcolor, color);
dialog.CellInheritColor.setAttribute("hidden","true");
}
else
{
globalCellElement.removeAttribute(bgcolor);
// Reveal addition message explaining "default" color
dialog.CellInheritColor.removeAttribute("hidden");
}
}
else
dialog.tableBackgroundColor = color;
{
if (color)
{
globalTableElement.setAttribute(bgcolor, color);
dialog.TableInheritColor.setAttribute("hidden","true");
}
else
{
globalTableElement.removeAttribute(bgcolor);
dialog.TableInheritColor.removeAttribute("hidden");
}
}
setColorWell(ColorWellID, color);
}
function SelectPrevious()
{
//TODO:Implement me!
}
function SelectPrevious()
{
//TODO:Implement me!
}
function SwitchPanel(newPanel)
{
if (currentPanel != newPanel)
{
//Set index for starting panel on the <tabpanel> element
TabPanel.setAttribute("index", newPanel);
if (newPanel == CellPanel)
{
// Trigger setting of style for the tab widgets
CellTab.setAttribute("selected", "true");
TableTab.removeAttribute("selected");
} else {
TableTab.setAttribute("selected", "true");
CellTab.removeAttribute("selected");
}
currentPanel = newPanel;
}
}
// More weirdness: Can't pass in "inputWidget" -- becomes undefined?!
// Must pass in just ID and use getElementById
function ValidateNumber(inputWidgetID, selectWidget, minVal, maxVal, element, attName)
{
var inputWidget = document.getElementById(inputWidgetID);
// Global error return value
error = false;
var maxLimit = maxVal;
var isPercent = false;
var numString = inputWidget.value.trimString();
if (numString && numString != "")
{
if (selectWidget)
isPercent = (selectWidget.selectedIndex == 1);
if (isPercent)
maxLimit = 100;
numString = ValidateNumberString(numString, minVal, maxLimit);
if(numString == "")
{
dump("Error returned from ValidateNumberString\n");
// Switch to appropriate panel for error reporting
SwitchValidatePanel(validatePanel)
// Error - shift to offending input widget
inputWidget.focus();
error = true;
}
else
{
if (isPercent)
numString += "%";
if (element)
element.setAttribute(attName, numString);
}
} else if (element) {
element.removeAttribute(attName);
}
return numString;
}
function SetAlign(selectWidgetID, defaultIndex, element, attName)
{
selectWidget = document.getElementById(selectWidgetID);
value = selectWidget.value;
dump("SetAlign value = "+value+"\n");
var index = selectWidget.selectedIndex;
if (index == defaultIndex)
element.removeAttribute(attName);
else
element.setAttribute(attName, value);
}
function ValidateTableData()
{
validatePanel = TablePanel;
var newRowCount = ValidateNumber("TableRowsInput", null, 1, rowCount, null, null);
if (error) return false;
var newColCount = ValidateNumber("TableColumnsInput", null, 1, colCount, null, null);
if (error) return false;
// TODO: ADD/DELETE ROWS/COLUMNS
var temp = ValidateNumber("TableHeightInput", dialog.TableHeightUnits,
1, maxPixels, globalTableElement, "height");
if (error) return false;
temp = ValidateNumber("TableWidthInput", dialog.TableWidthUnits,
1, maxPixels, globalTableElement, "width");
if (error) return false;
var border = ValidateNumber("BorderWidthInput", null, 0, maxPixels, globalTableElement, "border");
// TODO: Deal with "BORDER" without value issue
if (error) return false;
temp = ValidateNumber("SpacingInput", null, 0, maxPixels, globalTableElement, "cellspacing");
if (error) return false;
temp = ValidateNumber("PaddingInput", null, 0, maxPixels, globalTableElement, "cellpadding");
if (error) return false;
SetAlign("TableAlignSelect", defHAlignIndex, globalTableElement, "align");
// Color is set on globalCellElement immediately
// Background Image
var imageName = dialog.TableImageInput.value.trimString();
if (imageName && imageName != "")
{
if (IsValidImage(imageName))
globalTableElement.background = imageName;
else
{
dialog.TableImageInput.focus();
// Switch to appropriate panel for error reporting
SwitchValidatePanel(validatePanel)
ShowInputErrorMessage(GetString("MissingImageError"));
return false;
}
} else {
globalTableElement.removeAttribute("background");
}
return true;
}
function ValidateCellData()
{
validatePanel = CellPanel;
var temp;
temp = ValidateNumber("CellHeightInput", dialog.TableHeightUnits,
1, maxPixels, globalCellElement, "height");
if (error) return false;
temp = ValidateNumber("CellWidthInput", dialog.TableWidthUnits,
1, maxPixels, globalCellElement, "width");
if (error) return false;
// Vertical alignment is complicated by "char" type
var hAlign = dialog.CellHAlignSelect.value;
dump("Cell hAlign = "+hAlign+"\n");
var index = dialog.CellHAlignSelect.selectedIndex;
dump("HAlign index="+index+"\n");
if (index == defHAlignIndex)
{
globalCellElement.removeAttribute("hAlign");
globalCellElement.removeAttribute(charStr);
}
else
{
if (index == charIndex)
{
var alignChar = dialog.CellAlignCharInput.value.trimString();
globalCellElement.setAttribute(charStr, alignChar);
dump("Alignment char="+alignChar+" Align Value="+dialog.CellHAlignSelect.value+"\n");
}
globalCellElement.setAttribute("align",dialog.CellHAlignSelect.value);
}
SetAlign("CellVAlignSelect", defVAlignIndex, globalCellElement, "valign");
var shouldBeHeader = dialog.HeaderCheck.checked;
if (shouldBeHeader != CellIsHeader)
{
//TODO: THIS IS MESSY! Convert exisisting TD to TH or vice versa
}
if (dialog.NoWrapCheck.checked)
globalCellElement.setAttribute("nowrap","true");
else
globalCellElement.removeAttribute("nowrap");
// Background Image
var imageName = dialog.TableImageInput.value.trimString();
if (imageName && imageName != "")
{
if (IsValidImage(imageName))
globalCellElement.background = imageName;
else
{
dialog.CellImageInput.focus();
// Switch to appropriate panel for error reporting
SwitchValidatePanel(validatePanel)
ShowInputErrorMessage(GetString("MissingImageError"));
}
} else {
globalCellElement.removeAttribute("background");
}
return true;
}
function ValidateData()
{
dump("Table Editing:ValidateData()\n");
var result;
var savePanel = currentPanel;
// Validate current panel first
if (currentPanel == TablePanel)
{
result = ValidateTableData();
if (result)
result = ValidateCellData();
} else {
result = ValidateCellData();
if (result)
result = ValidateTableData();
}
if(!result) return false;
// If we passed, restore former currentPanel
currentPanel = savePanel;
// Set global element for AdvancedEdit
if(currentPanel == TablePanel)
globalElement = globalTableElement;
else
globalElement = globalCellElement;
return true;
}
@@ -163,7 +584,12 @@ function onOK()
{
if (ValidateData())
{
editorShell.CloneAttributes(TableElement, globalElement);
editorShell.CloneAttributes(TableElement, globalTableElement);
editorShell.CloneAttributes(CellElement, globalCellElement);
//TODO: DOM manipulation to add/remove table rows/columns,
// Switch cell type to TH -- involves removing TD and replacing with TD
// Creating and moving CAPTION element
return true;
}
return false;

View File

@@ -20,6 +20,7 @@
- Rights Reserved.
-
- Contributor(s):
- Ben Goodger
-->
<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?>
@@ -34,7 +35,6 @@
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()"
width="450" height="430"
align="vertical">
<!-- Methods common to all editor dialogs -->
@@ -51,351 +51,248 @@
<tab id="CellTab" onclick="SelectCellTab()" value="&cellTab.label;"/>
<spring flex="1"/>
</tabbox>
<tabpanel id="TabPanel" flex="100%">
<!-- table panel -->
<box id="TablePanel" align="vertical" class="panel">
<titledbox class="holder">
<title>&tableSize.label;</title>
<html:table width="350">
<html:tr>
<html:td>
<html:label for="tableRows.text">&tableRows.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="tableRows.text" size="3"/>
</html:td>
<html:td>
<html:input type="checkbox" id="tableHeight.check"/>
</html:td>
<html:td>
<html:label for="tableHeight.check">&tableHeight.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="tableHeight.text" size="3"/>
</html:td>
<html:td>
<html:select id="heightUnits">
<html:option value="px">&tablePixels.label;</html:option>
<html:option value="pc">&tablePercent.label;</html:option>
</html:select>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:label for="tableColumns.text">&tableColumns.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="tableColumns.text" size="3"/>
</html:td>
<html:td>
<html:input type="checkbox" id="tableWidth.check"/>
</html:td>
<html:td>
<html:label for="tableWidth.check">&tableWidth.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="tableWidth.text" size="3"/>
</html:td>
<html:td>
<html:select id="widthUnits">
<html:option value="px">&tablePixels.label;</html:option>
<html:option value="pc">&tablePercent.label;</html:option>
</html:select>
</html:td>
</html:tr>
</html:table>
</titledbox>
<box align="horizontal">
<titledbox flex="100%">
<title>&tableBorderSpacing.label;</title>
<html:table>
<html:tr>
<html:td>
<html:input type="checkbox" id="BorderWidthCheck"/>
</html:td>
<html:td>
<html:label for="BorderWidthCheck">&tableBorderWidth.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="BorderWidthInput" size="3"/>
</html:td>
<html:td>
<html:div>&tablePixels.label;</html:div>
</html:td>
</html:tr>
</html:table>
<html:table>
<html:tr>
<html:td>
<html:label for="spacing.text">&tableSpacing.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="spacing.text" size="3"/>
</html:td>
<html:td>
<html:div>&tablePxBetwCells.label;</html:div>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:label for="padding.text">&tablePadding.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="padding.text" size="3"/>
</html:td>
<html:td>
<html:div>&tablePxBetwBrdrCellContent.label;</html:div>
</html:td>
</html:tr>
</html:table>
</titledbox>
<box align="vertical" flex="100%">
<spring flex="100%"/>
<html:table>
<html:tr>
<html:td>
<html:label for="alignment.select">&tableAlignment.label;</html:label>
</html:td>
<html:td>
<html:select id="alignment.select">
<html:option value="left">&tableAlignLeft.label;</html:option>
<html:option value="center">&tableAlignCenter.label;</html:option>
<html:option value="right">&tableAlignRight.label;</html:option>
</html:select>
</html:td>
</html:tr>
<spring flex="100%"/>
<html:tr>
<html:td>
<html:label for="caption.select">&tableCaption.label;</html:label>
</html:td>
<html:td>
<html:select id="caption.select">
<html:option value="none">&tableCaptionNone.label;</html:option>
<html:option value="above">&tableCaptionAbove.label;</html:option>
<html:option value="below">&tableCaptionBelow.label;</html:option>
</html:select>
</html:td>
</html:tr>
</html:table>
<spring flex="100%"/>
<tabpanel class="Padding5" orient="vertical" id="TabPanel">
<!-- TABLE PANEL -->
<box id="TablePanel" orient="vertical">
<titledbox class="NoBottomPad NoTopMargin NoTopPadding"><title><text value="&size.label;"/></title>
<box orient="vertical">
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="TableRowsInput" value="&tableRows.label;"/>
<html:div><html:input type="text" id="TableRowsInput" size="5" onkeyup="forceInteger(this.id)" disabled="true"/></html:div>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="TableColumnsInput" value="&tableColumns.label;"/>
<html:input type="text" id="TableColumnsInput" size="5" onkeyup="forceInteger(this.id)" disabled="true"/>
</box>
</box>
</box>
<titledbox>
<title>&tableBackground.label;</title>
<html:table width="100%">
<html:tr>
<html:td>
<html:label for="bgcolor.select">&tableColor.label;</html:label>
</html:td>
<html:td>
<menu class="colorpicker">
<html:div id="tableBackgroundCW" class="color-well"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup>
<colorpicker id="tableBackgroundCP" palettename="standard" onclick="GetColorAndUpdate('tableBackgroundCP','tableBackgroundCW',this);"/>
<titledbutton class="push" value="&defaultColor.label;" onclick="GetColorAndUpdate('tableBackgroundCP','tableBackgroundCW',this"/>
</menupopup>
</menu>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:label for="bgimage.text">&tableImage.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="bgimage.text" style="width: 70%;"/>
<titledbutton class="push" value="&tableChooseImage.label;" id="bgimage.button"/>
</html:td>
</html:tr>
<html:tr>
<html:td/>
<html:td>
<html:input type="checkbox" id="leaveLoc.check"/>
<html:label for="leaveLoc.check">&tableLeaveImageAtLocation.label;</html:label>
</html:td>
</html:tr>
</html:table>
<spring class="bigspacer"/>
<spring class="bigspacer"/>
<box orient="vertical">
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="right" for="TableHeightInput" value="&tableHeight.label;"/>
<html:input type="text" id="TableHeightInput" size="5" onkeyup="forceInteger(this.id)"/>
<html:select id="TableHeightUnits"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="right" for="TableWidthInput" value="&tableWidth.label;"/>
<html:input type="text" id="TableWidthInput" size="5" onkeyup="forceInteger(this.id)"/>
<html:select id="TableWidthUnits"/>
</box>
</box>
<spring flex="1"/>
</titledbox>
<box>
<titledbox class="NoBottomPad" align="vertical"><title><text align="left" value="&tableBorderSpacing.label;"/></title>
<box valign="middle" autostretch="never">
<text align="left" for="BorderWidthInput" value="&tableBorderWidth.label;"/>
<spring class="spacer"/>
<html:input type="text" id="BorderWidthInput" size="3" onkeyup="forceInteger(this.id)"/>
<text align="left" value="&pixels.label;"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="SpacingInput" value="&tableSpacing.label;"/>
<html:input type="text" id="SpacingInput" size="3" onkeyup="forceInteger(this.id)"/>
<text align="left" value="&tablePxBetwCells.label;"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="PaddingInput" value="&tablePadding.label;"/>
<html:input type="text" id="PaddingInput" size="3" onkeyup="forceInteger(this.id)"/>
<!-- Use DIV instead of TEXT because label has embeded <br> -->
<html:div>&tablePxBetwBrdrCellContent.label;</html:div>
</box>
<spring flex="1"/>
</titledbox>
<spring class="spacer"/>
<box orient="vertical" flex="1">
<spring class="bigspacer"/>
<box orient="vertical" flex="1">
<text align="left" for="TableAlignSelect" value="&tableAlignment.label;"/>
<spring class="smallspacer"/>
<html:select id="TableAlignSelect">
<html:option value="left">&AlignLeft.label;</html:option>
<html:option value="center">&AlignCenter.label;</html:option>
<html:option value="right">&AlignRight.label;</html:option>
</html:select>
<spring class="bigspacer"/>
<text align="left" for="CaptionSelect" value="&tableCaption.label;"/>
<spring class="smallspacer"/>
<html:select id="CaptionSelect" disabled="true">
<html:option>&tableCaptionNone.label;</html:option>
<html:option>&tableCaptionAbove.label;</html:option>
<html:option>&tableCaptionBelow.label;</html:option>
</html:select>
<spring flex="1"/>
</box>
</box>
<spring class="bigspacer"/>
</box>
<titledbox class="NoBottomPad" align="vertical"><title><text align="left" value="&background.label;"/></title>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" value="&color.label;"/>
<menu class="colorpicker">
<html:div id="tableBackgroundCW" class="color-well"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup>
<colorpicker id="tableBackgroundCP" palettename="standard" onclick="GetColorAndUpdate('tableBackgroundCP','tableBackgroundCW',this);"/>
<titledbutton class="push" value="&defaultColor.label;" onclick="GetColorAndUpdate('tableBackgroundCP','tableBackgroundCW',this)"/>
</menupopup>
</menu>
<spring class="spacer"/>
<text id="TableInheritColor" value="&tableInheritColor.label;" hidden="true"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="TableImageInput" value="&image.label;"/>
<html:input type="text" id="TableImageInput" flex="1"/>
<titledbutton class="push" value="&ChooseImage.label;" id="bgimage.button"/>
</box>
<!-- Not sure if we will support this
<box valign="middle" autostretch="never">
<spring class="MinWidth50"/>
<html:input type="checkbox" id="TableLeaveLocCheck"/>
<text align="left" for="TableLeaveLocCheck" value="&LeaveImageAtLocation.label;"/>
</box>
-->
</titledbox>
<spring class="spacer"/>
<box flex="1" autostretch="never">
<spring flex="1"/>
<!-- From EdDialogOvlerlay.xul -->
<titledbutton id="AdvancedEditButton2"/>
</box>
<spring flex="1"/>
</box>
<!-- cell panel -->
<box id="CellPanel" align="vertical" class="panel">
<titledbox class="holder">
<title>&cellSelection.label;</title>
<html:table width="350">
<html:tr>
<html:td>
<html:select id="selection.select">
<html:option value="cell">&cellSelectionCell.label;</html:option>
<html:option value="row">&cellSelectionRow.label;</html:option>
<html:option value="column">&cellSelectionColumn.label;</html:option>
</html:select>
</html:td>
<html:td>
<titledbutton class="push" value="&cellSelectionPrevious.label;" id="previous.button"/>
</html:td>
<html:td>
<titledbutton class="push" value="&cellSelectionNext.label;" id="next.button"/>
</html:td>
</html:tr>
</html:table>
<!-- CELL PANEL -->
<box id="CellPanel" orient="vertical">
<titledbox class="NoTopMargin NoTopPadding NoBottomPad" autostretch="never" valign="middle">
<title><text align="left" value="&cellSelection.label;"/></title>
<spring class="spacer"/>
<html:select class="MinWidth50" id="SelectionSelect" disabled="true">
<html:option>&cellSelectionCell.label;</html:option>
<html:option>&cellSelectionRow.label;</html:option>
<html:option>&cellSelectionColumn.label;</html:option>
</html:select>
<spring class="bigspacer"/>
<titledbutton class="push MinWidth50" value="&cellSelectionPrevious.label;" onclick="SelectPrevious()" disabled="true"/>
<spring class="bigspacer"/>
<titledbutton class="push MinWidth50" value="&cellSelectionNext.label;" onclick="SelectNext()" disabled="true"/>
</titledbox>
<!-- cell size fieldset -->
<titledbox>
<title>&tableSize.label;</title>
<html:table>
<html:tr>
<html:td>
<html:input type="checkbox" id="cellHeight.check"/>
</html:td>
<html:td>
<html:label for="tableHeight.check">&tableHeight.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="cellHeight.text" size="3"/>
</html:td>
<html:td>
<html:select id="cellHeightUnits">
<html:option value="px">&tablePixels.label;</html:option>
<html:option value="pc">&tablePercent.label;</html:option>
</html:select>
</html:td>
<html:td>
<html:label for="rows.text">&cellSpans.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="rows.text" size="3"/>
</html:td>
<html:td>
<html:div>&cellSpanRows.label;</html:div>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:input type="checkbox" id="tableWidth.check"/>
</html:td>
<html:td>
<html:label for="tableWidth.check">&tableWidth.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="tableWidth.text" size="3"/>
</html:td>
<html:td>
<html:select id="cellWidthUnits">
<html:option value="px">&tablePixels.label;</html:option>
<html:option value="pc">&tablePercent.label;</html:option>
</html:select>
</html:td>
<html:td> </html:td>
<html:td>
<html:input type="text" id="cols.text" size="3"/>
</html:td>
<html:td>
<html:div>&cellSpanCols.label;</html:div>
</html:td>
</html:tr>
</html:table>
</titledbox>
<box align="horizontal">
<titledbox flex="100%">
<title>&cellContentAlignment.label;</title>
<html:table>
<html:tr>
<html:td>
<html:label for="horzAlignment.select">&cellHorizontal.label;</html:label>
</html:td>
<html:td>
<html:select id="horzAlignment.select">
<html:option value="left">&tableAlignLeft.label;</html:option>
<html:option value="center">&tableAlignCenter.label;</html:option>
<html:option value="right">&tableAlignRight.label;</html:option>
</html:select>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:label for="vertAlignment.select">&cellVertical.label;</html:label>
</html:td>
<html:td>
<html:select id="vertAlignment.select">
<html:option value="top">&cellAlignTop.label;</html:option>
<html:option value="center">&cellAlignCenter.label;</html:option>
<html:option value="bottom">&cellAlignBottom.label;</html:option>
</html:select>
</html:td>
</html:tr>
</html:table>
</titledbox>
<box align="vertical">
<titledbox>
<title>&cellTextStyle.label;</title>
<html:table>
<html:tr>
<html:td>
<html:input type="checkbox" id="header.check"/>
</html:td>
<html:td>
<html:label for="header.check">&cellHeader.label;</html:label>
</html:td>
<html:td>
<html:input type="checkbox" id="nonbreaking.check"/>
</html:td>
<html:td>
<html:label for="nonbreaking.check">&cellNonbreaking.label;</html:label>
</html:td>
</html:tr>
</html:table>
</titledbox>
<spring flex="100%"/>
<!-- cell size titledbox -->
<titledbox class="NoBottomPad"><title><text align="left" value="&size.label;"/></title>
<box orient="vertical">
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="CellHeightInput" value="&tableHeight.label;"/>
<html:input type="text" id="CellHeightInput" size="5" onkeyup="forceInteger(this.id)"/>
<html:select id="CellHeightUnits"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="CellWidthInput" value="&tableWidth.label;"/>
<html:input type="text" id="CellWidthInput" size="5" onkeyup="forceInteger(this.id)"/>
<html:select id="CellWidthUnits"/>
</box>
</box>
<spring class="bigspacer"/>
<box orient="vertical">
<spring class="spacer"/>
<text for="RowSpanInput" value="&cellSpans.label;"/>
</box>
<box orient="vertical">
<box valign="middle" autostretch="never">
<html:input type="text" id="RowSpanInput" size="4" onkeyup="forceInteger(this.id)"/>
<text align="left" value="&cellSpanRows.label;"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<html:input type="text" id="ColSpanInput" size="4" onkeyup="forceInteger(this.id)"/>
<text align="left" value="&cellSpanCols.label;"/>
</box>
</box>
</box>
<titledbox>
<title>&tableBackground.label;</title>
<html:table width="100%">
<html:tr>
<html:td>
<html:label for="cellbgcolor.select">&tableColor.label;</html:label>
</html:td>
<html:td>
<menu class="colorpicker">
<html:div id="cellBackgroundCW" class="color-well"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup>
<colorpicker id="cellBackgroundCP" palettename="standard"
onclick="GetColorAndUpdate('cellBackgroundCP','cellBackgroundCW',this)"/>
<titledbutton class="push" value="&defaultColor.label;"
onclick="GetColorAndUpdate('cellBackgroundCP','cellBackgroundCW',this)"/>
</menupopup>
</menu>
</html:td>
</html:tr>
<html:tr>
<html:td>
<html:label for="cellbgimage.text">&tableImage.label;</html:label>
</html:td>
<html:td>
<html:input type="text" id="cellbgimage.text" style="width: 70%;"/>
<titledbutton class="push" value="&tableChooseImage.label;" id="cellbgimage.button"/>
</html:td>
</html:tr>
<html:tr>
<html:td/>
<html:td>
<html:input type="checkbox" id="cellleaveLoc.check"/>
<html:label for="cellleaveLoc.check">&tableLeaveImageAtLocation.label;</html:label>
</html:td>
</html:tr>
</html:table>
</titledbox>
<box>
<titledbox class="NoBottomPad" orient="vertical" flex="1">
<title><text align="left" value="&cellContentAlignment.label;"/></title>
<box valign="top" autostretch="never">
<text class="MinWidth70" align="right" for="CellHAlignSelect" value="&cellHorizontal.label;"/>
<html:select class="MinWidth100" id="CellHAlignSelect" onchange="SelectCellHAlign()">
<html:option value="left">&AlignLeft.label;</html:option>
<html:option value="center">&AlignCenter.label;</html:option>
<html:option value="right">&AlignRight.label;</html:option>
<html:option value="justify">&cellAlignJustify.label;</html:option>
<html:option value="char">&cellAlignAtChar.label;</html:option>
</html:select>
<spring class="spacer"/>
<html:input id="CellAlignCharInput" size="2" maxlength="2" visibility="hidden"/>
</box>
<spring class="spacer"/>
<box valign="top" autostretch="never">
<text class="MinWidth70" align="right" for="CellVAlignSelect" value="&cellVertical.label;"/>
<html:select class="MinWidth100" id="CellVAlignSelect">
<html:option value="top">&cellAlignTop.label;</html:option>
<html:option value="middle">&cellAlignMiddle.label;</html:option>
<html:option value="bottom">&cellAlignBottom.label;</html:option>
</html:select>
</box>
</titledbox>
<spring class="spacer"/>
<titledbox class="NoBottomPad" orient="vertical">
<title><text align="left" value="&cellTextStyle.label;"/></title>
<box valign="middle" autostretch="never">
<html:input type="checkbox" id="HeaderCheck"/>
<text align="left" for="HeaderCheck" value="&cellHeader.label;"/>
</box>
<box valign="middle" autostretch="never">
<html:input type="checkbox" id="NoWrapCheck"/>
<text align="left" for="NoWrapCheck" value="&cellNoWrap.label;"/>
</box>
</titledbox>
</box>
<titledbox class="NoBottomPad" orient="vertical"><title><text align="left" value="&background.label;"/></title>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" value="&color.label;"/>
<menu class="colorpicker">
<html:div id="cellBackgroundCW" class="color-well"/>
<titledbutton class="popup" align="right" flex="1"/>
<menupopup>
<colorpicker id="cellBackgroundCP" palettename="standard"
onclick="GetColorAndUpdate('cellBackgroundCP','cellBackgroundCW',this)"/>
<titledbutton class="push" value="&defaultColor.label;"
onclick="GetColorAndUpdate('cellBackgroundCP','cellBackgroundCW',this)"/>
</menupopup>
</menu>
<spring class="spacer"/>
<text id="CellInheritColor" value="&cellInheritColor.label;" hidden="true"/>
</box>
<spring class="spacer"/>
<box valign="middle" autostretch="never">
<text class="MinWidth50" align="left" for="CellImageInput" value="&image.label;"/>
<html:input type="text" id="CellImageInput" flex="1"/>
<titledbutton class="push" value="&ChooseImage.label;" id="cellbgimage.button"/>
</box>
<!-- Not sure if we will support this
<box valign="middle" autostretch="never">
<spring class="MinWidth50"/>
<html:input type="checkbox" id="CellLeaveLocCheck"/>
<text align="left" for="CellLeaveLocCheck" value="&LeaveImageAtLocation.label;"/>
</box>
-->
</titledbox>
<spring class="spacer"/>
<box autostretch="never">
<spring flex="1"/>
<!-- From EdDialogOvlerlay.xul -->
<titledbutton id="AdvancedEditButton3"/>
</box>
</box>
</tabpanel>
<spring class="spacer"/>
<!-- from EdDialogOverlay -->
<box id="okCancelButtons"/>
</tabcontrol>
<!-- from EdDialogOverlay -->
<box id="AdvancedEdit"/>
<spring flex="100%"/>
<box id="okCancelButtons"/>
</window>

View File

@@ -23,7 +23,7 @@
<!-- Window title -->
<!ENTITY windowTitle.label "Page Colors and Background">
<!ENTITY pageColors.label "Page Colors: ">
<!ENTITY defaultColorsRadio.label "Don't specify colors">
<!ENTITY defaultColorsRadio.label "Reader's default colors (Don't set colors in page)">
<!ENTITY customColorsRadio.label "Use custom colors:">
<!ENTITY colorScheme.label "Color Schemes: ">
<!ENTITY normalText.label "Normal text:">
@@ -32,7 +32,6 @@
<!ENTITY visitedLinkText.label "Visited link text:">
<!ENTITY background.label "Background:">
<!ENTITY backgroundImage.label "Background Image (Uncheck to edit without image): ">
<!ENTITY colorPicker.default.label "Don't specify color">
<!ENTITY saveImageMsg.label "Location will be saved so you can use it later.">

View File

@@ -23,49 +23,56 @@
<!ENTITY tableWindow.title "Table Properties">
<!ENTITY tableTab.label "Table">
<!ENTITY cellTab.label "Cells">
<!ENTITY tableSize.label "Size">
<!ENTITY tableRows.label "Row">
<!ENTITY tableColumns.label "Columns">
<!ENTITY tableRows.label "Rows:">
<!ENTITY tableColumns.label "Columns:">
<!ENTITY tableHeight.label "Height:">
<!ENTITY tableWidth.label "Width:">
<!ENTITY tablePixels.label "pixels">
<!ENTITY tablePercent.label "percent of window">
<!ENTITY tableBorderSpacing.label "Borders and Spacing">
<!ENTITY tableBorderWidth.label "Border width:">
<!ENTITY tableSpacing.label "Spacing:">
<!ENTITY tablePadding.label "Padding:">
<!ENTITY tablePxBetwCells.label "pixels between cells">
<!-- Don't translate <html:br/> -->
<!ENTITY tablePxBetwBrdrCellContent.label "pixels between border<html:br/>and cell content">
<!ENTITY tableBackground.label "Background">
<!ENTITY tableColor.label "Color:">
<!ENTITY tableImage.label "Image:">
<!ENTITY tableLeaveImageAtLocation.label "Leave image at original location">
<!ENTITY tableChooseImage.label "Choose Image...">
<!ENTITY tableAlignment.label "Table<html:br/>Alignment:">
<!ENTITY tableAlignment.label "Table Alignment:">
<!ENTITY tableCaption.label "Caption:">
<!ENTITY tableAlignLeft.label "Left">
<!ENTITY tableAlignCenter.label "Center">
<!ENTITY tableAlignRight.label "Right">
<!ENTITY tableCaptionAbove.label "Above Table">
<!ENTITY tableCaptionBelow.label "Below Table">
<!ENTITY tableCaptionNone.label "None">
<!ENTITY tableInheritColor.label "(Let page color show through)">
<!ENTITY cellPercent.label "percent of table">
<!ENTITY cellSelection.label "Selection">
<!ENTITY cellSelectionCell.label "Cell">
<!ENTITY cellSelectionRow.label "Row">
<!ENTITY cellSelectionColumn.label "Column">
<!ENTITY cellSelectionNext.label "Next">
<!ENTITY cellSelectionPrevious.label "Previous">
<!ENTITY cellSpans.label "Spans:">
<!ENTITY cellContentAlignment.label "Content Alignment:">
<!ENTITY cellSpans.label "Cell spans:">
<!ENTITY cellContentAlignment.label "Content Alignment">
<!ENTITY cellHorizontal.label "Horizontal:">
<!ENTITY cellVertical.label "Vertical:">
<!ENTITY cellTextStyle.label "Text Style">
<!ENTITY cellHeader.label "Header">
<!ENTITY cellNonbreaking.label "Nonbreaking">
<!ENTITY cellNoWrap.label "Don't wrap text">
<!ENTITY cellAlignTop.label "Top">
<!ENTITY cellAlignCenter.label "Center">
<!ENTITY cellAlignMiddle.label "Middle">
<!ENTITY cellAlignBottom.label "Bottom">
<!ENTITY cellAlignJustify.label "Justify">
<!ENTITY cellAlignAtChar.label "At Character:">
<!ENTITY cellSpanRows.label "rows">
<!ENTITY cellSpanCols.label "columns">
<!ENTITY cellInheritColor.label "(Let table color show through)">
<!-- Used in both Table and Cell panels -->
<!ENTITY defaultColor.label "Don't specify color">
<!ENTITY size.label "Size">
<!ENTITY pixels.label "pixels">
<!ENTITY background.label "Background">
<!ENTITY color.label "Color:">
<!ENTITY image.label "Image:">
<!ENTITY LeaveImageAtLocation.label "Leave image at original location">
<!ENTITY ChooseImage.label "Choose Image...">
<!ENTITY AlignLeft.label "Left">
<!ENTITY AlignCenter.label "Center">
<!ENTITY AlignRight.label "Right">

View File

@@ -27,18 +27,65 @@
*/
table { cell-spacing: 0px; }
td, table { border: 0px;}
table {
border-collapse: separate;
border-spacing: 0px;
margin: 0px;
border: 0px;
}
td { border: 0px;}
/* Use to center vertically in a table cell */
tr {
vertical-align: middle;
}
input.MinWidth200, text.MinWidth200, titledbutton.MinWidth200 {
/* input widgets are too high! This doesn't seem to help */
input {
height: 1em;
max-height: 1em;
padding-top: 5px;
padding-bottom: 5px;
margin: 0px;
}
/* This also doesn't work! */
input[disabled="true"]
{
background-color: #CCCCCC;
}
/* This strategy for hidding allows widget to keep layout space
while using "hidden" attribute sets to display: none, removing space
*/
input[visibility=hidden]
{
visibility: hidden;
}
input.MinWidth200,select.MinWidth200,div.MinWidth200,titledbutton.MinWidth200,text.MinWidth200,spring.MinWidth100 {
min-width: 200px;
}
input.MinWidth100,select.MinWidth100,div.MinWidth100,titledbutton.MinWidth100,text.MinWidth100,spring.MinWidth100 {
min-width: 100px;
}
input.MinWidth70,select.MinWidth70,label.MinWidth70,div.MinWidth70,titledbutton.MinWidth70,text.MinWidth70,spring.MinWidth70 {
min-width: 70px;
}
input.MinWidth50,select.MinWidth50,label.MinWidth50,div.MinWidth50,titledbutton.MinWidth50,text.MinWidth50,spring.MinWidth50 {
min-width: 50px;
}
input#CellAlignCharInput {
padding-left: 3px;
padding-right: 3px;
}
select.SpellCheckList, select.SpellCheckLanguage, input.SpellCheckWord {
width: 200px;
}
@@ -92,6 +139,25 @@ td#ColorPreview div {
/* XUL ELEMENTS */
/* These reduce extra space to
minimize total height in Table Dialog
*/
titledbox.NoBottomPad {
padding-bottom: 0px;
}
titledbox.NoTopMargin {
margin-bottom: 0px;
}
titledbox.NoTopPadding {
padding-top: 0px;
}
tabpanel.Padding5 {
padding: 5px;
}
/* SHOULD GO IN GLOBAL.CSS */
text {
text-align: left;
@@ -101,13 +167,6 @@ text[hidden="true"], input[hidden="true"] {
display: none;
}
/* values = margin, padding. Padding doesn't work yet */
/* Should be in XUL.css? */
tab {
padding: 0px 3px;
}
select#alignTypeSelect,label#alignLabel {
margin-left: 5px;
}
@@ -117,12 +176,6 @@ titledbutton#AdvancedEditButton,titledbutton#AdvancedEditExtraButton,titledbutto
min-width: 8em;
}
titledbutton#editImageMap,titledbutton#removeImageMap {
margin-left: 6px;
margin-right: 6px;
min-width: 8em;
}
titledbutton#MoreFewerButton[more="0"] {
margin-left: 6px;
list-style-image: url(chrome://global/skin/scroll-down.gif);
@@ -168,7 +221,11 @@ titledbutton.color-well {
border: 1px solid #CCCCCC;
padding: 0px;
margin: 0px;
background-color: #AA0000;
}
titledbutton.color-well[default="true"] {
border: 1px solid transparent;
background-color: inherit;
}
titledbutton.color-well:hover {
@@ -186,6 +243,13 @@ titledbutton.SizeToParent {
min-width: 5em;
}
spring.smallspacer {
width: 3px;
height: 3px;
min-width: 3px;
min-height: 3px;
}
spring.spacer {
width: 5px;
height: 5px;