Fixed Composer UI to adjust to latest global CSS changes. Mostly needed to add appropriate class to titled buttons. Change editorshell to stop throbber animation even if editor fails to initialize. r=sfraser

This commit is contained in:
cmanske%netscape.com 1999-10-29 22:33:34 +00:00
Родитель 03a7c2f9f9
Коммит c808246711
18 изменённых файлов: 137 добавлений и 164 удалений

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

@ -163,7 +163,7 @@ GetDocument(nsIWebShell *aWebShell, nsIDocument **aDoc )
// Utility to set and attribute of an element (used for throbber)
static nsresult
SetXULDocAttribute( nsIWebShell *shell, const char *id,
SetChromeAttribute( nsIWebShell *shell, const char *id,
const char *name, const nsString &value )
{
nsCOMPtr<nsIDocument> doc;
@ -3547,7 +3547,8 @@ nsEditorShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, cons
{
// Start the throbber
// TODO: We should also start/stop it for saving and publishing?
return SetXULDocAttribute( mWebShell, "Editor:Throbber", "busy", "true" );
SetChromeAttribute( mWebShell, "Editor:Throbber", "busy", "true" );
return NS_OK;
}
NS_IMETHODIMP
@ -3568,8 +3569,7 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel,
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
res = PrepareDocumentForEditing(aUrl);
if (NS_SUCCEEDED(res))
res = SetXULDocAttribute( mWebShell, "Editor:Throbber", "busy", "false" );
SetChromeAttribute( mWebShell, "Editor:Throbber", "busy", "false" );
}
return res;

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

@ -163,7 +163,7 @@ GetDocument(nsIWebShell *aWebShell, nsIDocument **aDoc )
// Utility to set and attribute of an element (used for throbber)
static nsresult
SetXULDocAttribute( nsIWebShell *shell, const char *id,
SetChromeAttribute( nsIWebShell *shell, const char *id,
const char *name, const nsString &value )
{
nsCOMPtr<nsIDocument> doc;
@ -3547,7 +3547,8 @@ nsEditorShell::OnStartDocumentLoad(nsIDocumentLoader* loader, nsIURI* aURL, cons
{
// Start the throbber
// TODO: We should also start/stop it for saving and publishing?
return SetXULDocAttribute( mWebShell, "Editor:Throbber", "busy", "true" );
SetChromeAttribute( mWebShell, "Editor:Throbber", "busy", "true" );
return NS_OK;
}
NS_IMETHODIMP
@ -3568,8 +3569,7 @@ nsEditorShell::OnEndDocumentLoad(nsIDocumentLoader* loader, nsIChannel* channel,
nsCOMPtr<nsIURI> aUrl;
channel->GetURI(getter_AddRefs(aUrl));
res = PrepareDocumentForEditing(aUrl);
if (NS_SUCCEEDED(res))
res = SetXULDocAttribute( mWebShell, "Editor:Throbber", "busy", "false" );
SetChromeAttribute( mWebShell, "Editor:Throbber", "busy", "false" );
}
return res;

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

@ -123,13 +123,11 @@
<toolbox>
<!-- toolbar filled out from editorOverlay -->
<toolbar id="EditToolbar">
<toolbar id="EditToolbar" class="standard" persist="collapsed">
<titledbutton id="newButton"/>
<titledbutton id="openButton"/>
<titledbutton id="saveButton"/>
<html:div class="separator" align="vertical" />
<toolbarseparator/>
<titledbutton id="printButton"/>
<titledbutton id="findButton"/>
<titledbutton id="spellingButton"/>

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

@ -132,21 +132,20 @@
<!-- toolbar filled out from editorOverlay -->
<!-- add class="standard" for dark blue background (icons need rework first) -->
<toolbar id="EditToolbar" class="standard" persist="collapsed">
<!-- box id="toolbar_button_box" -->
<titledbutton id="newButton"/>
<titledbutton id="openButton"/>
<titledbutton id="saveButton"/>
<toolbarseparator/>
<titledbutton id="printButton"/>
<titledbutton id="findButton"/>
<titledbutton id="spellingButton"/>
<toolbarseparator/>
<titledbutton id="imageButton"/>
<titledbutton id="hlineButton"/>
<titledbutton id="tableButton"/>
<titledbutton id="linkButton"/>
<titledbutton id="namedAnchorButton"/>
<spring flex="100%"/>
<box id="toolbar_throbber_box" align="vertical">

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

@ -551,47 +551,47 @@
<titledbutton id="newButton" class="button28" src="&newEditorIcon.url;" observes="cmd_newEditor" value="&newMenu.label;" />
<titledbutton id="openButton" class="button28" src="&openEditorIcon.url;" observes="Editor:Open"/>
<titledbutton id="saveButton" class="button28" src="&saveIcon.url;" observes="Editor:Save"/>
<titledbutton id="printButton" src="&printIcon.url;" observes="Editor:Print"/>
<titledbutton id="findButton" src="&findIcon.url;" observes="Editor:Find"/>
<titledbutton id="spellingButton" src="&spellingIcon.url;" value="&spellToolbarCmd.label;" onclick="CheckSpelling()"/>
<titledbutton id="printButton" class="other28" src="&printIcon.url;" observes="Editor:Print"/>
<titledbutton id="findButton" class="other28" src="&findIcon.url;" observes="Editor:Find"/>
<titledbutton id="spellingButton" class="other28" src="&spellingIcon.url;" value="&spellToolbarCmd.label;" onclick="CheckSpelling()"/>
<titledbutton id="imageButton" src="&imageIcon.url;" value="&imageToolbarCmd.label;" onclick="EditorInsertImage()"/>
<titledbutton id="hlineButton" src="&hlineIcon.url;" value="&hruleToolbarCmd.label;" onclick="EditorInsertHLine()"/>
<titledbutton id="tableButton" src="&tableIcon.url;" value="&tableToolbarCmd.label;" onclick="EditorInsertOrEditTable(true)"/>
<titledbutton id="linkButton" src="&linkIcon.url;" value="&linkToolbarCmd.label;" onclick="EditorInsertLink()"/>
<titledbutton id="namedAnchorButton" src="&anchorIcon.url;" value="&anchorToolbarCmd.label;" onclick="EditorInsertNamedAnchor()"/>
<titledbutton id="imageButton" class="other28" src="&imageIcon.url;" value="&imageToolbarCmd.label;" onclick="EditorInsertImage()"/>
<titledbutton id="hlineButton" class="other28" src="&hlineIcon.url;" value="&hruleToolbarCmd.label;" onclick="EditorInsertHLine()"/>
<titledbutton id="tableButton" class="other28" src="&tableIcon.url;" value="&tableToolbarCmd.label;" onclick="EditorInsertOrEditTable(true)"/>
<titledbutton id="linkButton" class="other28" src="&linkIcon.url;" value="&linkToolbarCmd.label;" onclick="EditorInsertLink()"/>
<titledbutton id="namedAnchorButton" class="other28" src="&anchorIcon.url;" value="&anchorToolbarCmd.label;" onclick="EditorInsertNamedAnchor()"/>
<!-- Formatting toolbar items -->
<titledbutton style="width:68pt" id="ParagraphPopupButton" value="&paragraphToolbarMenu.label;" class="popup" align="left" popupanchor="bottomleft">
<observes element="Editor:Paragraph:Format" attribute="format" onbroadcast="onParagraphFormatChange()"/>
</titledbutton>
<titledbutton id="FontFacePopupButton" value="&fontToolbarMenu.label;" class="popup" align="right" popupanchor="bottomleft"/>
<titledbutton id="FontSizePopupButton" value="&sizeToolbarMenu.label;" class="popup" align="right" popupanchor="bottomleft"/>
<titledbutton id="TextColorPopupButton" src="chrome://editor/skin/images/text-color.gif" class="popup" popupanchor="bottomleft"/>
<titledbutton id="BackColorPopupButton" src="chrome://editor/skin/images/backcolor.gif" class="popup" popupanchor="bottomleft"/>
<titledbutton id="FontFacePopupButton" class="format popup" value="&fontToolbarMenu.label;" align="right" popupanchor="bottomleft"/>
<titledbutton id="FontSizePopupButton" class="format popup" value="&sizeToolbarMenu.label;" align="right" popupanchor="bottomleft"/>
<titledbutton id="TextColorPopupButton" class="format popup" src="chrome://editor/skin/images/text-color.gif" popupanchor="bottomleft"/>
<titledbutton id="BackColorPopupButton" class="format popup" src="chrome://editor/skin/images/backcolor.gif" popupanchor="bottomleft"/>
<!-- can't just use observes here because we don't want the value from the broadcaster -->
<titledbutton id="boldButton" value="&formatToolbar.boldChar;" align="center" onclick="EditorToggleStyle('bold')">
<titledbutton id="boldButton" class="format TextAttribute" value="&formatToolbar.boldChar;" align="center" onclick="EditorToggleStyle('bold')">
<observes element="Editor:Bold" attribute="bold" onbroadcast="onStyleChange('bold')"/>
</titledbutton>
<titledbutton id="italicButton" value="&formatToolbar.italicChar;" align="center" onclick="EditorToggleStyle('italic')">
<titledbutton id="italicButton" class="format TextAttribute" value="&formatToolbar.italicChar;" align="center" onclick="EditorToggleStyle('italic')">
<observes element="Editor:Italic" attribute="italic" onbroadcast="onStyleChange('italic')"/>
</titledbutton>
<titledbutton id="underlineButton" value="&formatToolbar.underlineChar;" align="center" onclick="EditorToggleStyle('underline')">
<titledbutton id="underlineButton" class="format TextAttribute" value="&formatToolbar.underlineChar;" align="center" onclick="EditorToggleStyle('underline')">
<observes element="Editor:Underline" attribute="underline" onbroadcast="onStyleChange('underline')"/>
</titledbutton>
<titledbutton id="ulButton" src="&bulletListIcon.url;" onclick="EditorMakeOrChangeList('ul')">
<titledbutton id="ulButton" class="format" src="&bulletListIcon.url;" onclick="EditorMakeOrChangeList('ul')">
<observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ul')"/>
</titledbutton>
<titledbutton id="olButton" src="&numberListIcon.url;" align="bottom" onclick="EditorMakeOrChangeList('ol')">
<titledbutton id="olButton" class="format" src="&numberListIcon.url;" align="bottom" onclick="EditorMakeOrChangeList('ol')">
<observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ol')"/>
</titledbutton>
<titledbutton id="outdentButton" src="&outdentIcon.url;" align="bottom" onclick="EditorIndent('outdent')"/>
<titledbutton id="indentButton" src="&indentIcon.url;" align="bottom" onclick="EditorIndent('indent')"/>
<titledbutton id="AlignPopupButton" src="&alignpopupIcon.url;" align="bottom" class="popup" popupanchor="bottomleft"/>
<titledbutton id="outdentButton" class="format" src="&outdentIcon.url;" align="bottom" onclick="EditorIndent('outdent')"/>
<titledbutton id="indentButton" class="format" src="&indentIcon.url;" align="bottom" onclick="EditorIndent('indent')"/>
<titledbutton id="AlignPopupButton" class="format popup" src="&alignpopupIcon.url;" align="bottom" popupanchor="bottomleft"/>
<!-- DEBUG only -->

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

@ -54,85 +54,67 @@ toolbar#EditToolbar titledbutton#SaveButton[dirty="true"] {
list-style-image:url(chrome://editor/skin/images/savemod.gif);
}
toolbar#FormatToolbar titledbutton:hover {
border: 1px solid transparent;
background-image:url("chrome://editor/skin/images/hover-teal.gif");
background-repeat: no-repeat;
background-position: center center;
toolbar#FormatToolbar titledbutton[class~=format] {
margin: 2px 2px 2px 2px;
padding: 2px;
text-decoration: none;
color: inherit;
}
toolbar#FormatToolbar titledbutton:active {
border: 1px inset white;
toolbar#FormatToolbar titledbutton[class~=format]:hover {
/* What we should use, but this has a blue border that doesn't look good against gray toolbars
background-image:url("chrome://global/skin/otherbutton28-bg-hover.gif");
*/
background-image:url("chrome://editor/skin/images/hover-teal.gif");
background-repeat: no-repeat;
background-position: center center;
text-decoration: none;
/* global class="plain" should do this! */
}
/*
titledbutton[class~=popup]:hover {
border: 1px solid white;
list-style-image:url(chrome://editor/skin/images/savefile.gif);
toolbar#FormatToolbar titledbutton[class~=format]:active {
margin: 3px 1px 1px 3px;
}
*/
/*
Experimental: a flat look for buttons that show "set" state, like bold
toolbar#FormatToolbar titledbutton[toggled="1"] {
toolbar#FormatToolbar titledbutton[class~=format][toggled="1"] {
border: 1px solid #003366;
}
*/
/*
toolbar#FormatToolbar titledbutton[toggled="1"] {
background-color: #AACCCC;
}
*/
/* Use negative margins to bring buttons together to look like one */
toolbar#FormatToolbar titledbutton#TextColorPopupButton {
margin-right: -3px;
}
toolbar#FormatToolbar titledbutton#BackColorPopupButton {
margin-left: -3px;
toolbar#FormatToolbar titledbutton[class~=TextAttribute] {
/* Make these narrower */
padding: 2px 0px;
min-width: 18px;
width: 18px;
/*height: 16px; */
/* padding: 2px 0px 0px 0px;*/
font-size: 19px;
font-family: times, serif, sans-serif;
}
toolbar#FormatToolbar titledbutton#boldButton {
min-width: 16px;
font-size: 19px;
font-weight: bold;
font-family: times, serif, sans-serif;
height: 16px;
padding: 0px;
padding-top: 2px;
}
toolbar#FormatToolbar titledbutton#boldButton:hover {
text-decoration: none;
}
toolbar#FormatToolbar titledbutton#italicButton {
min-width: 16px;
font-size: 19px;
font-weight: bold;
font-family: times, serif, sans-serif;
font-style: italic;
height: 16px;
padding: 0px;
padding-top: 2px;
}
toolbar#FormatToolbar titledbutton#italicButton:hover {
text-decoration: none;
}
toolbar#FormatToolbar titledbutton#underlineButton {
min-width: 16px;
font-size: 19px;
font-weight: normal;
font-family: times, serif, sans-serif;
text-decoration: underline;
height: 16px;
padding: 0px;
padding-top: 2px;
}
/* Use negative margins to bring buttons together to look like one */
toolbar#FormatToolbar titledbutton#TextColorPopupButton {
margin-right: -2px;
}
toolbar#FormatToolbar titledbutton#BackColorPopupButton {
margin-left: -2px;
}
box#DisplayModeBar titledbutton[class~=DisplayModeButton] {
@ -171,13 +153,11 @@ box#DisplayModeBar titledbutton[class~=DisplayModeButton][selected="1"] {
box#DisplayModeBar titledbutton[class~=DisplayModeButton][selected="1"]:hover {
background-color: #66AAAA;
color: white;
text-decoration: none;
}
box#DisplayModeBar titledbutton[class~=DisplayModeButton][selected="1"]:active {
background-color: #33FFFF;
color: black;
text-decoration: none;
}
box#DisplayModeBar div.VerticalSeparator {

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

@ -89,7 +89,7 @@
<box align="horizontal" flex="100%">
<html:div><html:input type="text" id="AddHTMLAttributeValueInput"/></html:div>
<spring flex="100%" class="spacer"/>
<html:div><titledbutton class="hspaced" id="AddHTMLAttribute" onclick="onAddHTMLAttribute()" value="&AddAttributeButton.label;" disabled="true"/></html:div>
<html:div><titledbutton class="push" id="AddHTMLAttribute" onclick="onAddHTMLAttribute()" value="&AddAttributeButton.label;" disabled="true"/></html:div>
</box>
</box>
</html:fieldset>
@ -122,7 +122,7 @@
<box align="horizontal" flex="100%">
<html:div><html:input type="text" id="AddJSEAttributeValueInput"/></html:div>
<spring flex="100%" class="spacer"/>
<html:div><titledbutton class="hspaced" id="AddJSEAttribute" onclick="onAddJSEAttribute()" value="&AddAttributeButton.label;" disabled="true"/></html:div>
<html:div><titledbutton class="push" id="AddJSEAttribute" onclick="onAddJSEAttribute()" value="&AddAttributeButton.label;" disabled="true"/></html:div>
</box>
</box>
</html:fieldset>
@ -155,7 +155,7 @@
<box align="horizontal" flex="100%">
<html:div><html:input type="text" id="AddCSSAttributeValueInput"/></html:div>
<spring flex="100%" class="spacer"/>
<html:div><titledbutton class="hspaced" id="AddCSSAttribute" onclick="onAddCSSAttribute()" value="&AddAttributeButton.label;" disabled="true"/></html:div>
<html:div><titledbutton class="push" id="AddCSSAttribute" onclick="onAddCSSAttribute()" value="&AddAttributeButton.label;" disabled="true"/></html:div>
</box>
</box>
</html:fieldset>
@ -166,7 +166,7 @@
</tabcontrol>
<box align="horizontal">
<html:div style="margin-top: 0.5em"><titledbutton value="&HTMLReference.label;"/></html:div>
<html:div style="margin-top: 0.5em"><titledbutton class="push" value="&HTMLReference.label;"/></html:div>
<spring flex="100%"/>
<!-- from global dialogOverlay -->
<box id="okCancelButtons"/>

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

@ -30,7 +30,7 @@
<box id="AdvancedEditButton" align="vertical">
<box align="horizontal" id="AdvancedEditButtonNoHR" style="margin-top: 0.2em">
<titledbutton class="hspaced" id="AdvancedEdit" onclick="onAdvancedEdit()" value="&AdvancedEditButton.label;"/>
<titledbutton class="push" id="AdvancedEdit" onclick="onAdvancedEdit()" value="&AdvancedEditButton.label;"/>
</box>
<html:div class="separator" align="horizontal"/>
</box>

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

@ -49,7 +49,7 @@
<input type="text" class="SpellCheckWord" id="WordInput" size="10"/>
</td>
<td>
<xul:titledbutton class="SizeToParent" id="AddWord" onclick="AddWord()" value="&AddButton.label;"/>
<xul:titledbutton class="push SizeToParent" id="AddWord" onclick="AddWord()" value="&AddButton.label;"/>
</td>
</tr>
<tr>
@ -63,12 +63,12 @@
</select>
</td>
<td>
<xul:titledbutton class="SizeToParent" id="ReplaceWord" onclick="ReplaceWord()" value="&ReplaceButton.label;"/>
<xul:titledbutton class="push SizeToParent" id="ReplaceWord" onclick="ReplaceWord()" value="&ReplaceButton.label;"/>
<br/>
<xul:titledbutton class="SizeToParent" id="RemoveWord" onclick="RemoveWord()" value="&RemoveButton.label;"/>
<xul:titledbutton class="push SizeToParent" id="RemoveWord" onclick="RemoveWord()" value="&RemoveButton.label;"/>
<br/>
<!-- This simply closes the window -->
<xul:titledbutton class="CloseButton" id="Close" onclick="onCancel()" value="&CloseButton.label;"/>
<xul:titledbutton class="push CloseButton" id="Close" onclick="onCancel()" value="&CloseButton.label;"/>
</td>
</tr>
</table>

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

@ -79,7 +79,7 @@
<box align="horizontal">
<html:label><html:input type="checkbox" id="3dShading"/>&threeDShading.label;</html:label>
<spring flex="100%"/>
<titledbutton id="SaveDefault" onclick="onSaveDefault()" value="&saveSettings.label;"/>
<titledbutton class="push" id="SaveDefault" onclick="onSaveDefault()" value="&saveSettings.label;"/>
</box>
<!-- from EdDialogOverlay -->
<box id="AdvancedEditButton"/>

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

@ -114,23 +114,23 @@
<xul:toolbar id="toolbar">
<xul:titledbutton src="&cutIcon.url;"/>
<xul:titledbutton src="&copyIcon.url;"/>
<xul:titledbutton src="&pasteIcon.url;"/>
<xul:titledbutton class="push" src="&cutIcon.url;"/>
<xul:titledbutton class="push" src="&copyIcon.url;"/>
<xul:titledbutton class="push" src="&pasteIcon.url;"/>
<xul:menuseparator/>
<xul:titledbutton src="&zoomInIcon.url;"/>
<xul:titledbutton src="&zoomOutIcon.url;"/>
<xul:titledbutton toggled="0" src="&contrastIcon.url;" onclick="highContrast()"/>-
<xul:titledbutton class="push" src="&zoomInIcon.url;"/>
<xul:titledbutton class="push" src="&zoomOutIcon.url;"/>
<xul:titledbutton class="push" toggled="0" src="&contrastIcon.url;" onclick="highContrast()"/>-
<xul:spring flex="100%"/>
</xul:toolbar>
<xul:box align="horizontal" flex="100">
<xul:toolbar id="toolbox" align="vertical">
<xul:titledbutton src="&pointerIcon.url;" id="pointer" toggled="0" onclick="changeTool(event, 'select')"/>
<xul:titledbutton src="&rectangleIcon.url;" id="rect" toggled="1" onclick="changeTool(event, 'rect')"/>
<xul:titledbutton src="&circleIcon.url;" id="cir" toggled="0" onclick="changeTool(event, 'cir')"/>
<xul:titledbutton src="&polygonIcon.url;" id="poly" toggled="0" onclick="changeTool(event, 'poly')"/>
<xul:titledbutton class="push" src="&pointerIcon.url;" id="pointer" toggled="0" onclick="changeTool(event, 'select')"/>
<xul:titledbutton class="push" src="&rectangleIcon.url;" id="rect" toggled="1" onclick="changeTool(event, 'rect')"/>
<xul:titledbutton class="push" src="&circleIcon.url;" id="cir" toggled="0" onclick="changeTool(event, 'cir')"/>
<xul:titledbutton class="push" src="&polygonIcon.url;" id="poly" toggled="0" onclick="changeTool(event, 'poly')"/>
<xul:spring flex="100%"/>
</xul:toolbar>
<iframe id="content" src="EdImageMapPage.html" flex="100%"/>
@ -139,10 +139,10 @@
<xul:toolbar>
<!-- Cheap hack untill I get key events hooked up -->
<xul:titledbutton value="Delete Spot" onclick="deleteElement(currentElement)"/>
<xul:titledbutton class="push" value="Delete Spot" onclick="deleteElement(currentElement)"/>
<xul:spring flex="100%"/>
<xul:titledbutton value="OK" onclick="finishMap()"/>
<xul:titledbutton value="Cancel" onclick="exitImageMap()"/>
<xul:titledbutton class="push" value="OK" onclick="finishMap()"/>
<xul:titledbutton class="push" value="Cancel" onclick="exitImageMap()"/>
</xul:toolbar>
</xul:window>

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

@ -60,10 +60,11 @@ function Startup()
dialog.imagetbInput = document.getElementById( "imagetopbottomInput" );
dialog.imageborderInput = document.getElementById( "imageborderInput" );
// Start in the mode initialized in the "SeeMore" var above
//TODO; We should get the current state of the "More" area from a pref
// Initialize to true, but calling this will toggle to "collapsed"
SeeMore = true;
// Set SeeMore bool to the OPPOSITE of the current state,
// which is automatically saved by using the 'persist="more"'
// attribute on the MoreFewerButton button
// onMoreFewer will toggle it and redraw the dialog
SeeMore = (dialog.MoreFewerButton.getAttribute("more") != "1");
onMoreFewer();
if (null == dialog.srcInput ||

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

@ -52,10 +52,11 @@
<!-- /////////////////////// Parent table //////////////////////////////// -->
<!--
<table>
<tr>
<td>
-->
<!-- /////////////////////// Choose File Alt text table /////////////////// -->
@ -138,7 +139,7 @@
</tr>
<tr>
<td>
<xul:titledbutton id="MoreFewerButton" align="left" style="width: 10em" onclick="onMoreFewer()"/>
<xul:titledbutton class="push" id="MoreFewerButton" align="left" style="width: 10em" onclick="onMoreFewer()" persist="more"/>
</td>
<td/>
</tr>
@ -147,6 +148,7 @@
<!-- ////////////////////// "More" controls table ///////////////////////////////// -->
<div id="MoreRow" style="visibility: inherit; display: block;">
<xul:box align="vertical">
<table>
<tr>
<td>
@ -242,7 +244,7 @@
<td>
<xul:titledbutton
class = "popup"
class = "push popup"
id = "widthunitSelect"
style = "width: 50px;"
disabled = "true"
@ -286,7 +288,7 @@
<td>
<xul:titledbutton
class = "popup"
class = "push popup"
id = "heightunitSelect"
style = "width: 50px;"
disabled = "true"
@ -339,7 +341,7 @@
<xul:titledbutton
id = "image.alignType"
src = "resource:/chrome/editor/skin/default/images/img-align-bottom.gif"
class = "popup"
class = "push popup"
popup = "ImageTextAlignment"
popupanchor = "bottomleft"
align = "left"
@ -471,15 +473,18 @@
</td>
</tr>
</table>
</xul:box>
</div> <!-- END of block that is hidden by More/Less button -->
<!-- from EdDialogOverlay -->
<xul:box id="AdvancedEditButtonNoHR"/>
</div> <!-- END of block that is hidden by More/Less button -->
<!-- ///////////////////// End Parent Table //////////////////////////////////// -->
<!--
</td>
</tr>
</table>
-->
<div class="separator" align="horizontal"/>
<!-- ////////////////////////// OK CANCEL Box /////////////////////////////// -->
@ -510,7 +515,7 @@
<xul:box align="vertical" flex="100%" style="border: 1px outset white;">
<xul:titledbutton
class = "select"
class = "push select"
value = "&pixelsPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
@ -519,7 +524,7 @@
window.close();"/>
<xul:titledbutton
class = "select"
class = "push select"
value = "&percentPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
@ -556,7 +561,7 @@
<xul:box align="vertical" flex="100%" style="border: 1px outset white;">
<xul:titledbutton
class = "select"
class = "push select"
value = "&pixelsPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
@ -565,7 +570,7 @@
window.close();"/>
<xul:titledbutton
class = "select"
class = "push select"
value = "&percentPopup.value;"
align = "center"
style = "height:20px; vertical-align: middle;"
@ -600,35 +605,35 @@
<xul:box align="vertical" flex="100%" style="border: 1px outset white;">
<xul:titledbutton
<xul:titledbutton class="push"
src = "&topIcon.url;"
value = "&topPopup.value;"
onclick = "opener.SetImageAlignment('top');
opener.popupSelectedImage('&topIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
<titledbutton class="push"
src = "&centerIcon.url;"
value ="&centerPopup.value;"
onclick = "opener.SetImageAlignment('middle');
opener.popupSelectedImage('&centerIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
<titledbutton class="push"
src = "&bottomIcon.url;"
value = "&bottomPopup.value;"
onclick = "opener.SetImageAlignment('bottom', 'image.alignType');
opener.popupSelectedImage('&bottomIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
<titledbutton class="push"
src = "&wrapRightIcon.url;"
value = "&wrapRightPopup.value;"
onclick = "opener.SetImageAlignment('left', 'image.alignType');
opener.popupSelectedImage('&wrapRightIcon.url;', 'image.alignType', 'src');
window.close();" />
<titledbutton
<titledbutton class="push"
src = "&wrapLeftIcon.url;"
value = "&wrapLeftPopup.value;"
onclick = "opener.SetImageAlignment('right');

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

@ -172,12 +172,11 @@ function Startup()
linkTextInput = null;
}
}
var moreAtt = MoreFewerButton.getAttribute("more");
dump("More att: "+moreAtt+"\n");
// Set the bool to the OPPOSITE of the current state,
// onMoreFewer will toggle it
SeeMore = (moreAtt == "1");
// Set SeeMore bool to the OPPOSITE of the current state,
// which is automatically saved by using the 'persist="more"'
// attribute on the MoreFewerButton button
// onMoreFewer will toggle it and redraw the dialog
SeeMore = (MoreFewerButton.getAttribute("more") != "1");
onMoreFewer();
}
@ -412,10 +411,3 @@ function onOK()
}
return false;
}
function onUnload()
{
dump("Unloading LinkProperties -- More value is "+SeeMore+"\n");
document.persist("MoreFewerButton", "more");
}

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

@ -33,7 +33,7 @@
class="dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/TR/REC-html40"
onload = "Startup()" onunload="onUnload()"
onload = "Startup()"
align="vertical" >
<html:script language="JavaScript" src="chrome://editor/content/EdDialogCommon.js"/>
@ -55,18 +55,18 @@
<box align="horizontal">
<html:div> &LinkURLEditField.label;</html:div>
<spring flex="100%"/>
<html:div><titledbutton id="RemoveLink" onclick="RemoveLink()" value="&RemoveLinkButton.label;" style="width: 7em"/>
<html:div><titledbutton class="push" id="RemoveLink" onclick="RemoveLink()" value="&RemoveLinkButton.label;" style="width: 7em"/>
</html:div>
</box>
<box align="horizontal">
<html:input type="text" size="25" length="25" id="hrefInput"></html:input>
<spring flex="100%"/>
<!-- The div prevents button from being the same height as the input field -->
<html:div><titledbutton id="ChooseFile" onclick="ChooseFile()" value="&LinkChooseFileButton.label;" style="width: 7em"/></html:div>
<html:div><titledbutton class="push" id="ChooseFile" onclick="ChooseFile()" value="&LinkChooseFileButton.label;" style="width: 7em"/></html:div>
</box>
</box>
<!-- ***** The style: width setting is need to cover a bug in button width resizing when text changes ***** -->
<html:div><titledbutton id="MoreFewerButton" align="left" style="width: 10em" onclick="onMoreFewer()" persist="more"/></html:div>
<html:div><titledbutton class="push" id="MoreFewerButton" align="left" style="width: 10em" onclick="onMoreFewer()" persist="more"/></html:div>
<box id="MoreSection" align="vertical">
<spring class="spacer"/>
<html:div>&NamedAnchorMsg.label;</html:div>

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

@ -46,10 +46,10 @@
<!-- spring style="height: 15px"/ -->
<box align="horizontal" style="margin: 10px">
<spring flex="100%"/>
<titledbutton class="MsgButton" id="button1" onclick="onButton(1)"/>
<titledbutton class="MsgButton" id="button2" onclick="onButton(2)"/>
<titledbutton class="MsgButton" id="button3" onclick="onButton(3)"/>
<titledbutton class="MsgButton" id="button4" onclick="onButton(4)"/>
<titledbutton class="push MsgButton" id="button1" onclick="onButton(1)"/>
<titledbutton class="push MsgButton" id="button2" onclick="onButton(2)"/>
<titledbutton class="push MsgButton" id="button3" onclick="onButton(3)"/>
<titledbutton class="push MsgButton" id="button4" onclick="onButton(4)"/>
<spring flex="100%"/>
</box>
</window>

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

@ -200,7 +200,7 @@
</html:td>
<html:td>
<html:input type="text" id="bgimage.text" style="width: 70%;"/>
<titledbutton value="&tableChooseImage.label;" id="bgimage.button"/>
<titledbutton class="push" value="&tableChooseImage.label;" id="bgimage.button"/>
</html:td>
</html:tr>
<html:tr>
@ -228,10 +228,10 @@
</html:select>
</html:td>
<html:td>
<titledbutton value="&cellSelectionPrevious.label;" id="previous.button"/>
<titledbutton class="push" value="&cellSelectionPrevious.label;" id="previous.button"/>
</html:td>
<html:td>
<titledbutton value="&cellSelectionNext.label;" id="next.button"/>
<titledbutton class="push" value="&cellSelectionNext.label;" id="next.button"/>
</html:td>
</html:tr>
</html:table>
@ -365,7 +365,7 @@
</html:td>
<html:td>
<html:input type="text" id="cellbgimage.text" style="width: 70%;"/>
<titledbutton value="&tableChooseImage.label;" id="cellbgimage.button"/>
<titledbutton class="push" value="&tableChooseImage.label;" id="cellbgimage.button"/>
</html:td>
</html:tr>
<html:tr>

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

@ -123,13 +123,11 @@
<toolbox>
<!-- toolbar filled out from editorOverlay -->
<toolbar id="EditToolbar">
<toolbar id="EditToolbar" class="standard" persist="collapsed">
<titledbutton id="newButton"/>
<titledbutton id="openButton"/>
<titledbutton id="saveButton"/>
<html:div class="separator" align="vertical" />
<toolbarseparator/>
<titledbutton id="printButton"/>
<titledbutton id="findButton"/>
<titledbutton id="spellingButton"/>