More editor CSS and XUL cleanup. Use grid to control button widths in dialogs. [Grids rock!]. New text for Edit Mode buttons

This commit is contained in:
cmanske%netscape.com 2000-04-28 14:06:34 +00:00
Родитель 55f7d8f3a4
Коммит 4113539c28
7 изменённых файлов: 32 добавлений и 63 удалений

Просмотреть файл

@ -1037,7 +1037,7 @@ function EditorSetDisplayMode(mode)
editorShell.SetDisplayMode(mode);
// Set the UI states
document.getElementById("WYSIWYGModeButton").setAttribute("selected",Number(mode == 0));
document.getElementById("PreviewModeButton").setAttribute("selected",Number(mode == 0));
document.getElementById("NormalModeButton").setAttribute("selected",Number(mode == 1));
document.getElementById("TagModeButton").setAttribute("selected",Number(mode == 2));
contentWindow.focus();

Просмотреть файл

@ -22,7 +22,7 @@
/* Styles to alter look of things in the Editor content window
* for the "Normal Edit Mode" These settings will be removed
* when we display in completely WYSIWYG "Browser Preview" mode
* when we display in completely WYSIWYG "Edit Preview" mode
* Anything that should never change, like cursors, should be
* place in EditorOverride.css, instead of here.
*/

Просмотреть файл

@ -195,10 +195,10 @@
<toolbar id="EditModeToolbar" chromeclass="extrachrome" persist="collapsed">
<text class="margin-left-right" value="&editMode.label;"/>
<!-- From editorOverlay.xul -->
<text id="WYSIWYGModeButton"/>
<text id="NormalModeButton"/>
<text id="TagModeButton"/>
<!-- <text id="HTMLModeButton"/> -->
<text id="PreviewModeButton"/>
<spring flex="1"/>
</toolbar>

Просмотреть файл

@ -684,28 +684,28 @@
</menulist>
<stack id="ColorButtons" autostretch="never">
<text class="borderless" id="BackColorPopupButton" popup="BackColorPopup"/>
<text class="borderless" id="TextColorPopupButton" popup="TextColorPopup"/>
<text id="BackColorPopupButton" popup="BackColorPopup"/>
<text id="TextColorPopupButton" popup="TextColorPopup"/>
</stack>
<button class="button-toolbar" id="DecreaseFontSizeButton" oncommand="EditorDecreaseFontSize()"/>
<button class="button-toolbar" id="IncreaseFontSizeButton" oncommand="EditorIncreaseFontSize()"/>
<button class="button-toolbar FormatButton" id="boldButton" align="center" oncommand="EditorToggleStyle('bold')">
<button class="button-toolbar" id="boldButton" align="center" oncommand="EditorToggleStyle('bold')">
<observes element="Editor:Bold" attribute="bold" onbroadcast="onStyleChange('bold')"/>
</button>
<button class="button-toolbar FormatButton" id="italicButton" align="center" oncommand="EditorToggleStyle('italic')">
<button class="button-toolbar" id="italicButton" align="center" oncommand="EditorToggleStyle('italic')">
<observes element="Editor:Italic" attribute="italic" onbroadcast="onStyleChange('italic')"/>
</button>
<button class="button-toolbar FormatButton" id="underlineButton" align="center" oncommand="EditorToggleStyle('underline')">
<button class="button-toolbar" id="underlineButton" align="center" oncommand="EditorToggleStyle('underline')">
<observes element="Editor:Underline" attribute="underline" onbroadcast="onStyleChange('underline')"/>
</button>
<button class="button-toolbar FormatButton" id="ulButton" oncommand="EditorMakeOrChangeList('ul')">
<button class="button-toolbar" id="ulButton" oncommand="EditorMakeOrChangeList('ul')">
<observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ul')"/>
</button>
<button class="button-toolbar FormatButton" id="olButton" oncommand="EditorMakeOrChangeList('ol')">
<button class="button-toolbar" id="olButton" oncommand="EditorMakeOrChangeList('ol')">
<observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ol')"/>
</button>
@ -714,10 +714,10 @@
<button class="button-toolbar format popup" id="AlignPopupButton"/>
<!-- Edit Mode toolbar -->
<text id="WYSIWYGModeButton" class="EditModeButton" selected="0" value="&hideExtraMarkup.label;" onclick="EditorSetDisplayMode(0)"/>
<text id="NormalModeButton" class="EditModeButton" selected="1" value="&showExtraMarkup.label;" onclick="EditorSetDisplayMode(1)"/>
<text id="TagModeButton" class="EditModeButton" selected="0" value="&showAllTags.label;" onclick="EditorSetDisplayMode(2)"/>
<text id="HTMLModeButton" class="EditModeButton" selected="0" value="&HTMLSourceCmd.label;" onclick="EditorSetDisplayMode(3)"/>
<text id="NormalModeButton" class="EditModeButton" selected="1" value="&normalMode.label;" onclick="EditorSetDisplayMode(1)"/>
<text id="TagModeButton" class="EditModeButton" selected="0" value="&showAllTags.label;" onclick="EditorSetDisplayMode(2)"/>
<text id="HTMLModeButton" class="EditModeButton" selected="0" value="&HTMLSourceCmd.label;" onclick="EditorSetDisplayMode(3)"/>
<text id="PreviewModeButton" class="EditModeButton" selected="0" value="&previewMode.label;" onclick="EditorSetDisplayMode(0)"/>
<!-- InsertPopupButton is used by messengercompose.xul -->
<button class="button-toolbar format popup" id="InsertPopupButton"/>

Просмотреть файл

@ -543,7 +543,7 @@ Menu item text for "[Page|Table|Cell] Background color" is filled from
<!ENTITY colorPicker.default.accesskey "r">
<!-- Display Mode Toolbar -->
<!ENTITY showExtraMarkup.label "Normal">
<!ENTITY hideExtraMarkup.label "WYSIWYG">
<!ENTITY normalMode.label "Normal">
<!ENTITY previewMode.label "Edit Preview">
<!ENTITY showAllTags.label "Show All Tags">
<!ENTITY treeModeButton.label "Tag Tree">

Просмотреть файл

@ -30,27 +30,6 @@
border-bottom: 1px solid #003366;
}
.FormatButton {
border: 1px solid transparent;
margin: 1px 1px 1px 1px;
padding: 2px;
text-decoration: none;
color: inherit;
}
.FormatButton[toggled="1"] {
border: 1px white inset;
}
.FormatButton:hover {
border: 1px solid white;
text-decoration: none;
}
.FormatButton:active {
margin: 2px 0px 0px 2px;
}
.separator_small {
width: 1em;
}
@ -70,15 +49,6 @@
/* end of SHOULD GO IN GLOBAL */
/* THIS WILL GO SOON. With conversion to menulist */
select.toolbar {
/* This is ignored! */
/*font-size: smaller;*/
max-width: 20em;
margin: 2px 3px 0px 3px;
}
#EditModeToolbar {
padding: 0px;
/* Same as "standard" toolbar background */
@ -126,7 +96,6 @@ select.toolbar {
}
/* Image URLs for all Editor toolbar buttons */
#boldButton {
@ -268,9 +237,8 @@ select.toolbar {
#ColorButtons {
margin: 2px;
}
/* TODO: How to make inset color skinable? */
#TextColorPopupButton {
/*list-style-image:url("chrome://editor/skin/images/color.gif");*/
border: 1px inset #CCCCCC;
padding: 0px;
margin-right: 7px;
@ -282,7 +250,6 @@ select.toolbar {
}
#BackColorPopupButton {
/*list-style-image:url("chrome://editor/skin/images/color.gif");*/
border: 1px inset #CCCCCC;
padding: 0px;
margin-top: 7px;

Просмотреть файл

@ -52,19 +52,21 @@
<titledbox orient="vertical"><title><text class="label" value="&LinkURLBox.label;"/></title>
<text class="label" value="&LinkURLEditField.label;"/>
<box autostretch="never" valign="middle">
<textfield id="hrefInput" flex="1"/>
<spring class="spacer"/>
<!-- from EdDialogOverlay.xul -->
<!-- The style: width setting is need to cover a bug in button width resizing when text changes -->
<button class="dialog" id="ChooseFile" style="width: 7em"/>
</box>
<spring class="spacer"/>
<box>
<button class="dialog" id="MoreFewerButton" align="left" oncommand="onMoreFewer()" persist="more"/>
<spring flex="1"/>
<button class="dialog" id="RemoveLink" oncommand="RemoveLink()" value="&RemoveLinkButton.label;" style="width: 7em"/>
</box>
<grid>
<columns><column/><column/></columns>
<rows>
<row autostretch="never" vertical-align="middle">
<textfield id="hrefInput" flex="1"/>
<button class="dialog" id="ChooseFile" flex="1"/>
</row>
<row>
<box autostretch="never">
<button class="dialog" id="MoreFewerButton" align="left" oncommand="onMoreFewer()" persist="more"/>
</box>
<button class="dialog" id="RemoveLink" oncommand="RemoveLink()" value="&RemoveLinkButton.label;" flex="1"/>
</row>
</rows>
</grid>
<box id="MoreSection" orient="vertical">
<spring class="bigspacer"/>
<text class="label" align="left" value="&NamedAnchorMsg.label;"/>