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

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

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

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

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

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

@ -132,21 +132,20 @@
<!-- toolbar filled out from editorOverlay --> <!-- toolbar filled out from editorOverlay -->
<!-- add class="standard" for dark blue background (icons need rework first) --> <!-- add class="standard" for dark blue background (icons need rework first) -->
<toolbar id="EditToolbar" class="standard" persist="collapsed"> <toolbar id="EditToolbar" class="standard" persist="collapsed">
<!-- box id="toolbar_button_box" -->
<titledbutton id="newButton"/> <titledbutton id="newButton"/>
<titledbutton id="openButton"/> <titledbutton id="openButton"/>
<titledbutton id="saveButton"/> <titledbutton id="saveButton"/>
<toolbarseparator/>
<titledbutton id="printButton"/> <titledbutton id="printButton"/>
<titledbutton id="findButton"/> <titledbutton id="findButton"/>
<titledbutton id="spellingButton"/> <titledbutton id="spellingButton"/>
<toolbarseparator/>
<titledbutton id="imageButton"/> <titledbutton id="imageButton"/>
<titledbutton id="hlineButton"/> <titledbutton id="hlineButton"/>
<titledbutton id="tableButton"/> <titledbutton id="tableButton"/>
<titledbutton id="linkButton"/> <titledbutton id="linkButton"/>
<titledbutton id="namedAnchorButton"/> <titledbutton id="namedAnchorButton"/>
<spring flex="100%"/> <spring flex="100%"/>
<box id="toolbar_throbber_box" align="vertical"> <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="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="openButton" class="button28" src="&openEditorIcon.url;" observes="Editor:Open"/>
<titledbutton id="saveButton" class="button28" src="&saveIcon.url;" observes="Editor:Save"/> <titledbutton id="saveButton" class="button28" src="&saveIcon.url;" observes="Editor:Save"/>
<titledbutton id="printButton" src="&printIcon.url;" observes="Editor:Print"/> <titledbutton id="printButton" class="other28" src="&printIcon.url;" observes="Editor:Print"/>
<titledbutton id="findButton" src="&findIcon.url;" observes="Editor:Find"/> <titledbutton id="findButton" class="other28" src="&findIcon.url;" observes="Editor:Find"/>
<titledbutton id="spellingButton" src="&spellingIcon.url;" value="&spellToolbarCmd.label;" onclick="CheckSpelling()"/> <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="imageButton" class="other28" src="&imageIcon.url;" value="&imageToolbarCmd.label;" onclick="EditorInsertImage()"/>
<titledbutton id="hlineButton" src="&hlineIcon.url;" value="&hruleToolbarCmd.label;" onclick="EditorInsertHLine()"/> <titledbutton id="hlineButton" class="other28" src="&hlineIcon.url;" value="&hruleToolbarCmd.label;" onclick="EditorInsertHLine()"/>
<titledbutton id="tableButton" src="&tableIcon.url;" value="&tableToolbarCmd.label;" onclick="EditorInsertOrEditTable(true)"/> <titledbutton id="tableButton" class="other28" src="&tableIcon.url;" value="&tableToolbarCmd.label;" onclick="EditorInsertOrEditTable(true)"/>
<titledbutton id="linkButton" src="&linkIcon.url;" value="&linkToolbarCmd.label;" onclick="EditorInsertLink()"/> <titledbutton id="linkButton" class="other28" src="&linkIcon.url;" value="&linkToolbarCmd.label;" onclick="EditorInsertLink()"/>
<titledbutton id="namedAnchorButton" src="&anchorIcon.url;" value="&anchorToolbarCmd.label;" onclick="EditorInsertNamedAnchor()"/> <titledbutton id="namedAnchorButton" class="other28" src="&anchorIcon.url;" value="&anchorToolbarCmd.label;" onclick="EditorInsertNamedAnchor()"/>
<!-- Formatting toolbar items --> <!-- Formatting toolbar items -->
<titledbutton style="width:68pt" id="ParagraphPopupButton" value="&paragraphToolbarMenu.label;" class="popup" align="left" popupanchor="bottomleft"> <titledbutton style="width:68pt" id="ParagraphPopupButton" value="&paragraphToolbarMenu.label;" class="popup" align="left" popupanchor="bottomleft">
<observes element="Editor:Paragraph:Format" attribute="format" onbroadcast="onParagraphFormatChange()"/> <observes element="Editor:Paragraph:Format" attribute="format" onbroadcast="onParagraphFormatChange()"/>
</titledbutton> </titledbutton>
<titledbutton id="FontFacePopupButton" value="&fontToolbarMenu.label;" class="popup" align="right" popupanchor="bottomleft"/> <titledbutton id="FontFacePopupButton" class="format popup" value="&fontToolbarMenu.label;" align="right" popupanchor="bottomleft"/>
<titledbutton id="FontSizePopupButton" value="&sizeToolbarMenu.label;" class="popup" align="right" popupanchor="bottomleft"/> <titledbutton id="FontSizePopupButton" class="format popup" value="&sizeToolbarMenu.label;" align="right" popupanchor="bottomleft"/>
<titledbutton id="TextColorPopupButton" src="chrome://editor/skin/images/text-color.gif" class="popup" popupanchor="bottomleft"/> <titledbutton id="TextColorPopupButton" class="format popup" src="chrome://editor/skin/images/text-color.gif" popupanchor="bottomleft"/>
<titledbutton id="BackColorPopupButton" src="chrome://editor/skin/images/backcolor.gif" class="popup" 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 --> <!-- 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')"/> <observes element="Editor:Bold" attribute="bold" onbroadcast="onStyleChange('bold')"/>
</titledbutton> </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')"/> <observes element="Editor:Italic" attribute="italic" onbroadcast="onStyleChange('italic')"/>
</titledbutton> </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')"/> <observes element="Editor:Underline" attribute="underline" onbroadcast="onStyleChange('underline')"/>
</titledbutton> </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')"/> <observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ul')"/>
</titledbutton> </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')"/> <observes element="Editor:Paragraph:ListType" attribute="format" onbroadcast="onListFormatChange('ol')"/>
</titledbutton> </titledbutton>
<titledbutton id="outdentButton" src="&outdentIcon.url;" align="bottom" onclick="EditorIndent('outdent')"/> <titledbutton id="outdentButton" class="format" src="&outdentIcon.url;" align="bottom" onclick="EditorIndent('outdent')"/>
<titledbutton id="indentButton" src="&indentIcon.url;" align="bottom" onclick="EditorIndent('indent')"/> <titledbutton id="indentButton" class="format" src="&indentIcon.url;" align="bottom" onclick="EditorIndent('indent')"/>
<titledbutton id="AlignPopupButton" src="&alignpopupIcon.url;" align="bottom" class="popup" popupanchor="bottomleft"/> <titledbutton id="AlignPopupButton" class="format popup" src="&alignpopupIcon.url;" align="bottom" popupanchor="bottomleft"/>
<!-- DEBUG only --> <!-- DEBUG only -->

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

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

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

@ -89,7 +89,7 @@
<box align="horizontal" flex="100%"> <box align="horizontal" flex="100%">
<html:div><html:input type="text" id="AddHTMLAttributeValueInput"/></html:div> <html:div><html:input type="text" id="AddHTMLAttributeValueInput"/></html:div>
<spring flex="100%" class="spacer"/> <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>
</box> </box>
</html:fieldset> </html:fieldset>
@ -122,7 +122,7 @@
<box align="horizontal" flex="100%"> <box align="horizontal" flex="100%">
<html:div><html:input type="text" id="AddJSEAttributeValueInput"/></html:div> <html:div><html:input type="text" id="AddJSEAttributeValueInput"/></html:div>
<spring flex="100%" class="spacer"/> <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>
</box> </box>
</html:fieldset> </html:fieldset>
@ -155,7 +155,7 @@
<box align="horizontal" flex="100%"> <box align="horizontal" flex="100%">
<html:div><html:input type="text" id="AddCSSAttributeValueInput"/></html:div> <html:div><html:input type="text" id="AddCSSAttributeValueInput"/></html:div>
<spring flex="100%" class="spacer"/> <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>
</box> </box>
</html:fieldset> </html:fieldset>
@ -166,7 +166,7 @@
</tabcontrol> </tabcontrol>
<box align="horizontal"> <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%"/> <spring flex="100%"/>
<!-- from global dialogOverlay --> <!-- from global dialogOverlay -->
<box id="okCancelButtons"/> <box id="okCancelButtons"/>

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

@ -30,7 +30,7 @@
<box id="AdvancedEditButton" align="vertical"> <box id="AdvancedEditButton" align="vertical">
<box align="horizontal" id="AdvancedEditButtonNoHR" style="margin-top: 0.2em"> <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> </box>
<html:div class="separator" align="horizontal"/> <html:div class="separator" align="horizontal"/>
</box> </box>

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

@ -49,7 +49,7 @@
<input type="text" class="SpellCheckWord" id="WordInput" size="10"/> <input type="text" class="SpellCheckWord" id="WordInput" size="10"/>
</td> </td>
<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> </td>
</tr> </tr>
<tr> <tr>
@ -63,12 +63,12 @@
</select> </select>
</td> </td>
<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/> <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/> <br/>
<!-- This simply closes the window --> <!-- 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> </td>
</tr> </tr>
</table> </table>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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