Fixed Spell check dialog layout bug 72223, r=andreww, sr=hewitt

This commit is contained in:
cmanske%netscape.com 2001-04-04 04:05:14 +00:00
Родитель 7858a64e1c
Коммит 863069d760
3 изменённых файлов: 37 добавлений и 55 удалений

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

@ -64,7 +64,7 @@ function Startup()
dialog.ReplaceButton = document.getElementById("Replace");
dialog.IgnoreButton = document.getElementById("Ignore");
dialog.CloseButton = document.getElementById("Close");
dialog.ReplaceWordInput = document.getElementById("ReplaceWord");
dialog.ReplaceWordInput = document.getElementById("ReplaceWordInput");
dialog.SuggestedList = document.getElementById("SuggestedList");
dialog.LanguageMenulist = document.getElementById("LanguageMenulist");
@ -198,11 +198,14 @@ function DoEnabling()
dialog.ReplaceButton.removeAttribute("default");
dialog.IgnoreButton.removeAttribute("default");
dialog.CloseButton.setAttribute("default","true");
// Shouldn't have to do this if "default" is true?
dialog.CloseButton.focus();
SetElementEnabledById("MisspelledWordLabel", false);
SetElementEnabledById("ReplaceWordLabel", false);
SetElementEnabledById("ReplaceWord", false);
SetElementEnabledById("ReplaceWordInput", false);
SetElementEnabledById("CheckWord", false);
SetElementEnabledById("SuggestedListLabel", false);
SetElementEnabledById("SuggestedList", false);
@ -214,7 +217,7 @@ function DoEnabling()
} else {
SetElementEnabledById("MisspelledWordLabel", true);
SetElementEnabledById("ReplaceWordLabel", true);
SetElementEnabledById("ReplaceWord", true);
SetElementEnabledById("ReplaceWordInput", true);
SetElementEnabledById("CheckWord", true);
SetElementEnabledById("SuggestedListLabel", true);
SetElementEnabledById("SuggestedList", true);

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

@ -48,8 +48,8 @@
<grid>
<columns>
<column/>
<column style="min-width 15em; width: 15em"/>
<column class="spell-check"/>
<column class="spell-check"/>
</columns>
<rows>
<row valign="middle" autostretch="never">
@ -59,19 +59,17 @@
</row>
<row valign="middle" autostretch="never">
<text class="label" id="ReplaceWordLabel" value="&wordEditField.label;"/>
<box valign="middle" autostretch="never">
<textbox id="ReplaceWord" oninput="ChangeReplaceWord()" style="width: 14em"/>
<button id="CheckWord" oncommand="CheckWord()" label="&checkwordButton.label;"/>
<box valign="middle" autostretch="never" flex="1">
<!-- flex doesn't seem to work on textbox? -->
<textbox id="ReplaceWordInput" oninput="ChangeReplaceWord()" flex="1"/>
<button class="dialog" id="CheckWord" oncommand="CheckWord()" label="&checkwordButton.label;"/>
</box>
</row>
</rows>
</grid>
<text class="label" id="SuggestedListLabel" value="&suggestions.label;"/>
<grid flex="1">
<columns>
<column flex="1"/>
<column flex="1"/>
</columns>
<columns><column flex="1"/><column flex="1"/></columns>
<rows>
<row flex="1">
<!-- BUG! setting class="MinWidth20em" on tree doesn't work (width=0) -->
@ -80,42 +78,27 @@
<treecol flex="1"/>
</treecolgroup>
</tree>
<grid flex="1">
<columns>
<column flex="1"/>
<column flex="1"/>
</columns>
<rows>
<row>
<box>
<button class="dialog" id="Ignore" oncommand="Ignore()" label="&ignoreButton.label;"/>
</box>
<box>
<box orient="vertical">
<grid flex="1" autostretch="never">
<columns><column class="spell-check" flex="1"/><column class="spell-check" flex="1"/></columns>
<rows>
<row>
<button class="dialog" id="Ignore" oncommand="Ignore()" label="&ignoreButton.label;"/>
<button class="dialog" id="IgnoreAll" oncommand="IgnoreAll()" label="&ignoreAllButton.label;"/>
</box>
</row>
<row>
<box>
<button class="dialog" id="Replace" oncommand="Replace()" label="&changeButton.label;"/>
</box>
<box>
<button class="dialog" id="ReplaceAll" oncommand="ReplaceAll()" label="&changeAllButton.label;"/>
</box>
</row>
<spring class="bigspacer"/>
<text class="label" value="&userDictionary.label;"/>
<row>
<box>
<button class="dialog" id="AddToDictionary" oncommand="AddToDictionary()" label="&addToUserDictionaryButton.label;"/>
</box>
<box>
<button class="dialog" id="EditDictionary" oncommand="EditDictionary()" label="&editUserDictionaryButton.label;"/>
</box>
</row>
</rows>
</grid>
</row>
<row>
<button class="dialog" id="Replace" oncommand="Replace()" label="&changeButton.label;"/>
<button class="dialog" id="ReplaceAll" oncommand="ReplaceAll()" label="&changeAllButton.label;"/>
</row>
</rows>
</grid>
<spring flex="1"/>
<text class="label" value="&userDictionary.label;"/>
<box flex="1" autostretch="never">
<button class="dialog spell-check" id="AddToDictionary" oncommand="AddToDictionary()" label="&addToUserDictionaryButton.label;" />
<button class="dialog spell-check" id="EditDictionary" oncommand="EditDictionary()" label="&editUserDictionaryButton.label;" />
</box>
</box>
</row>
<row>
<text class="label" value ="&languagePopup.label;"/>
@ -125,12 +108,8 @@
<menulist id="LanguageMenulist" oncommand="SelectLanguage()"/>
<!-- contents are appended by JS -->
<box flex="1">
<box>
<button class="dialog" id="Recheck" flex="1" label="&recheckButton.label;" oncommand="Recheck()"/>
</box>
<box>
<button class="dialog" id="Close" flex="1" label="&closeButton.label;" oncommand="onClose()"/>
</box>
<button class="dialog spell-check" id="Recheck" label="&recheckButton.label;" oncommand="Recheck()"/>
<button class="dialog spell-check" id="Close" label="&closeButton.label;" oncommand="onClose()"/>
</box>
</row>
</rows>

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

@ -160,8 +160,8 @@
</menupopup>
</menulist>
<box flex="1">
<button id="PreviousButton" class="dialog" label="&cellSelectPrevious.label;" oncommand="MoveSelection(0)" flex="1"/>
<button id="NextButton" class="dialog right" label="&cellSelectNext.label;" oncommand="MoveSelection(1)" flex="1"/>
<button id="PreviousButton" class="dialog" label="&cellSelectPrevious.label;" oncommand="MoveSelection(0)" flex="1"/>
<button id="NextButton" class="dialog align-right" label="&cellSelectNext.label;" oncommand="MoveSelection(1)" flex="1"/>
</box>
</box>
<spring class="bigspacer"/>