Editor UI fixes: toolbar (47515), Page Colors dialog (47695), r=sfraser

This commit is contained in:
cmanske%netscape.com 2000-09-01 22:01:44 +00:00
Родитель 57319c5faf
Коммит 51220464b8
8 изменённых файлов: 104 добавлений и 99 удалений

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

@ -224,8 +224,7 @@
flex="1" style="width:1em; height:1em;"/>
</deck>
<!-- TODO: Set hidden="true" so default is to not show the editmode toolbar -->
<toolbar id="EditModeToolbar" autostretch="never" valign="middle" persist="hidden collapsed">
<toolbar id="EditModeToolbar" hidden="true" autostretch="never" valign="middle" persist="hidden collapsed">
<text id="EditModeLabel" class="margin-left-right" value="&editMode.label;"/>
<button id="NormalModeButton"/>
<button id="TagModeButton"/>

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

@ -270,7 +270,7 @@
<command id="cmd_viewCompToolbar" oncommand="goToggleToolbar('EditToolbar','cmd_viewCompToolbar');" checked="true"/>
<command id="cmd_viewFormatToolbar" oncommand="goToggleToolbar('FormatToolbar','cmd_viewFormatToolbar');" checked="true"/>
<command id="cmd_viewEditModeToolbar" oncommand="goToggleToolbar('EditModeToolbar','cmd_viewEditModeToolbar');"/>
<command id="cmd_viewEditModeToolbar" oncommand="goToggleToolbar('EditModeToolbar','cmd_viewEditModeToolbar');" checked="false"/>
<command id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<!-- Obsolete; these will go away -->

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

@ -43,7 +43,7 @@ IMGFiles=Image Files
TextFiles=Text Files
AllFiles=All Files
BeforeClosing=before closing
BeforePreview=before previewing in Navigator
BeforePreview=before viewing in Navigator
# LOCALIZATION NOTE (SaveFilePrompt): Don't translate %title% and %reason% (this is the reason for asking user to close, such as "before closing")
SaveFilePrompt=Save changes to "%title%" %reason%?
SaveFileFailed=Saving file failed!

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

@ -48,8 +48,8 @@
<!ENTITY filesaveas.accesskey "a">
<!ENTITY saveAsCharsetCmd.label "Save As Charset...">
<!ENTITY filesaveascharset.accesskey "h">
<!ENTITY previewCmd.label "Preview in Navigator">
<!ENTITY filepreview.accesskey "i">
<!ENTITY previewCmd.label "Browse Page">
<!ENTITY filepreview.accesskey "b">
<!ENTITY sendPageCmd.label "Send Page">
<!ENTITY sendPage.accesskey "g">
<!ENTITY printSetupCmd.label "Page Setup...">
@ -539,8 +539,8 @@
<!ENTITY openToolbarCmd.label "Open">
<!ENTITY openToolbarCmd.tooltip "Open a local file">
<!ENTITY saveToolbarCmd.tooltip "Save file locally">
<!ENTITY previewToolbarCmd.label "Preview">
<!ENTITY previewToolbarCmd.tooltip "Preview this page in Navigator">
<!ENTITY previewToolbarCmd.label "Browse">
<!ENTITY previewToolbarCmd.tooltip "Load this page into Navigator">
<!ENTITY printToolbarCmd.label "Print">
<!ENTITY printToolbarCmd.tooltip "Print this page">
<!ENTITY findToolbarCmd.label "Find">
@ -604,5 +604,5 @@
<!ENTITY HTMLSourceMode.tooltip "Edit HTML source">
<!ENTITY PreviewMode.label "Preview">
<!ENTITY PreviewMode.accesskey "p">
<!ENTITY PreviewMode.tooltip "Display as WYSIWYG (browser)">
<!ENTITY PreviewMode.tooltip "Display as WYSIWYG (as in Navigator)">

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

@ -316,9 +316,9 @@ function chooseFile()
{
// Get a local image file, converted into URL format
fileName = GetLocalFileURL("img");
if (fileName && fileName != "")
if (fileName)
{
dialog.BackgroundImageInput = filename;
dialog.BackgroundImageInput.value = fileName;
ValidateAndPreviewImage(true);
}
SetTextfieldFocus(dialog.BackgroundImageInput);
@ -389,12 +389,9 @@ function ValidateData()
{
// A valid image may be null for no image
if (backgroundImage)
{
globalElement.setAttribute(backgroundStr, backgroundImage);
} else {
else
globalElement.removeAttribute(backgroundStr);
return false;
}
}
return true;
}

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

@ -46,12 +46,13 @@
<broadcaster id="args" value=""/>
<popupset id="aTooltipSet" />
<titledbox orient="horizontal"><title value="&pageColors.label;" flex="1"/>
<titledbox orient="vertical"><title value="&pageColors.label;"/>
<box orient="horizontal">
<box orient="vertical">
<radiogroup id="pageColorGroup" orient="vertical" autostretch="never">
<radio group="pageColorGroup" id="DefaultColorsRadio" value="&defaultColorsRadio.label;" oncommand="UseDefaultColors()"
tooltip="aTooltip" tooltiptext="&defaultColorsRadio.tooltip;" />
<text class="label" value="&defaultColorsMsg.label;" style="text-align: right"/>
<text class="label" value="&defaultColorsMsg.label;" style="margin-left: 20px"/>
<radio group="pageColorGroup" id="CustomColorsRadio" value="&customColorsRadio.label;" oncommand="UseCustomColors()"
tooltip="aTooltip" tooltiptext="&customColorsRadio.tooltip;" />
</radiogroup>
@ -66,6 +67,7 @@
<box autostretch="never" valign="middle">
<spring id="textCW" class="color-well"/>
<image class="popup-trigger"/>
<spring flex="1"/>
</box>
<button id="TextButton" class="dialog color-button" onclick="GetColorAndUpdate('textCW')" flex="1"/>
</stack>
@ -125,6 +127,8 @@
<text class="label larger" id="VisitedLinkText" value="&visitedLinkText.label;"/>
<spring flex="1"/>
</box>
</box>
<spring class="spacer"/>
</titledbox>
<spring class="spacer"/>
<text class="label" value="&backgroundImage.label;"/>
@ -133,14 +137,15 @@
<rows>
<row autostretch="never" valign="middle" style="margin-bottom: 5px">
<textfield id="BackgroundImageInput" onkeyup="ChangeBackgroundImage()"
tooltip="aTooltip" tooltiptext="&backgroundImage.tooltip;" />
tooltip="aTooltip" tooltiptext="&backgroundImage.tooltip;"
style="min-width : 18em"/>
<!-- from EdDialogOverlay.xul -->
<button class="dialog" id="ChooseFile" flex="1"/>
<button class="dialog" id="ChooseFile"/>
</row>
<row autostretch="never" valign="middle">
<spring/>
<spring flex="1"/>
<!-- from EdDialogOverlay.xul -->
<button class="dialog" id="AdvancedEditButton" flex="1"/>
<button class="dialog" id="AdvancedEditButton"/>
</row>
</rows>
</grid>

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

@ -53,6 +53,8 @@ function Startup()
// Default string for new page is set from DTD string in XUL,
// so set only if not new doc URL
var location = editorShell.editorDocument.location;
var lastmodString = GetString("Unknown");
dump("location="+location);
if (location != "about:blank")
{
dialog.PageLocation.setAttribute("value", editorShell.editorDocument.location);
@ -61,11 +63,12 @@ function Startup()
// TODO: Convert this to local time?
var lastmod = editorShell.editorDocument.lastModified; // get string of last modified date
var lastmoddate = Date.parse(lastmod); // convert modified string to date
if(lastmoddate == 0) // unknown date (or January 1, 1970 GMT)
lastmod = GetString("Unknown");
if(lastmoddate != 0) // unknown date (or January 1, 1970 GMT)
lastmodString = lastmoddate;
document.getElementById("PageModDate").setAttribute("value",lastmod);
}
dump(", lastmod date="+lastmoddate+"\n");
document.getElementById("PageModDate").setAttribute("value", lastmodString);
authorElement = GetMetaElement("author");
if (!authorElement)

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

@ -55,6 +55,7 @@
<text class="label" value="&lastModified.label;" align="left"/>
<text class="label" id="PageModDate" align="left"/>
</row>
<spring class="spacer"/>
<row valign="middle">
<text class="label" value="&titleInput.label;"/>
<textfield class="MinWidth20em" id="TitleInput" onkeyup="TextfieldChanged(this.id)"/>