diff --git a/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul b/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul
index a2c8a78e2eb..cc15a124734 100644
--- a/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul
+++ b/mozilla/editor/ui/dialogs/content/EdAdvancedEdit.xul
@@ -41,8 +41,6 @@
ondialogcancel="return onCancel();"
ondialoghelp="return doHelpButton();">
-
-
diff --git a/mozilla/editor/ui/dialogs/content/EdColorPicker.js b/mozilla/editor/ui/dialogs/content/EdColorPicker.js
index b80847a01a6..75ee357785c 100644
--- a/mozilla/editor/ui/dialogs/content/EdColorPicker.js
+++ b/mozilla/editor/ui/dialogs/content/EdColorPicker.js
@@ -53,8 +53,8 @@ function Startup()
gDialog.CellOrTableGroup = document.getElementById("CellOrTableGroup");
gDialog.TableRadio = document.getElementById("TableRadio");
gDialog.CellRadio = document.getElementById("CellRadio");
- gDialog.Ok = document.getElementById("ok");
gDialog.ColorSwatch = document.getElementById("ColorPickerSwatch");
+ gDialog.Ok = document.documentElement.getButton("accept");
// The type of color we are setting:
// text: Text, Link, ActiveLink, VisitedLink,
@@ -135,8 +135,6 @@ function Startup()
}
gDialog.LastPickedColor.setAttribute("style","background-color: "+LastPickedColor);
- doSetOKCancel(onOK, onCancelColor);
-
// Set method to detect clicking on OK button
// so we don't get fooled by changing "default" behavior
gDialog.Ok.setAttribute("onclick", "SetDefaultToOk()");
@@ -193,7 +191,7 @@ function SelectColorByKeypress(aEvent)
function SelectLastPickedColor()
{
SetCurrentColor(LastPickedColor);
- if ( onOK() )
+ if ( onAccept() )
//window.close();
return true;
}
@@ -252,7 +250,7 @@ function ValidateData()
return true;
}
-function onOK()
+function onAccept()
{
if (!ValidateData())
return false;
diff --git a/mozilla/editor/ui/dialogs/content/EdColorPicker.xul b/mozilla/editor/ui/dialogs/content/EdColorPicker.xul
index 9928f404121..94ff59f8a0e 100644
--- a/mozilla/editor/ui/dialogs/content/EdColorPicker.xul
+++ b/mozilla/editor/ui/dialogs/content/EdColorPicker.xul
@@ -28,11 +28,11 @@
-
+ onload="Startup()"
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancelColor();">
@@ -43,7 +43,6 @@
-
@@ -85,6 +84,4 @@
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdColorProps.js b/mozilla/editor/ui/dialogs/content/EdColorProps.js
index 77411766c38..5b029e25477 100644
--- a/mozilla/editor/ui/dialogs/content/EdColorProps.js
+++ b/mozilla/editor/ui/dialogs/content/EdColorProps.js
@@ -37,11 +37,21 @@ var prefs;
var backgroundImage;
// Initialize in case we can't get them from prefs???
-var defaultTextColor="#000000";
-var defaultLinkColor="#000099";
-var defaultActiveColor="#000099";
-var defaultVisitedColor="#990099";
-var defaultBackgroundColor="#FFFFFF";
+const defaultTextColor="#000000";
+const defaultLinkColor="#000099";
+const defaultActiveColor="#000099";
+const defaultVisitedColor="#990099";
+const defaultBackgroundColor="#FFFFFF";
+const styleStr = "style";
+const textStr = "text";
+const linkStr = "link";
+const vlinkStr = "vlink";
+const alinkStr = "alink";
+const bgcolorStr = "bgcolor";
+const backgroundStr = "background";
+const colorStyle = "color: ";
+const backColorStyle = "background-color: ";
+const backImageStyle = "; background-image: url(";
var customTextColor;
var customLinkColor;
@@ -49,18 +59,6 @@ var customActiveColor;
var customVisitedColor;
var customBackgroundColor;
var previewBGColor;
-
-// Strings we use often
-var styleStr = "style";
-var textStr = "text";
-var linkStr = "link";
-var vlinkStr = "vlink";
-var alinkStr = "alink";
-var bgcolorStr = "bgcolor";
-var backgroundStr = "background";
-var colorStyle = "color: ";
-var backColorStyle = "background-color: ";
-var backImageStyle = "; background-image: url(";
var gHaveDocumentUrl = false;
// dialog initialization code
@@ -89,8 +87,6 @@ function Startup()
// Set element we will edit
globalElement = BodyElement.cloneNode(false);
- doSetOKCancel(onOK, onCancel);
-
// Initialize default colors from browser prefs
var browserColors = GetDefaultBrowserColors();
if (browserColors)
@@ -407,7 +403,7 @@ function ValidateData()
return false;
}
-function onOK()
+function onAccept()
{
if (ValidateData())
{
diff --git a/mozilla/editor/ui/dialogs/content/EdColorProps.xul b/mozilla/editor/ui/dialogs/content/EdColorProps.xul
index b705e208853..8b4ae1798fc 100644
--- a/mozilla/editor/ui/dialogs/content/EdColorProps.xul
+++ b/mozilla/editor/ui/dialogs/content/EdColorProps.xul
@@ -32,10 +32,11 @@
-
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -43,7 +44,6 @@
-
@@ -122,5 +122,4 @@
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdConvertToTable.js b/mozilla/editor/ui/dialogs/content/EdConvertToTable.js
index 3a1803aebf4..7884e683d98 100644
--- a/mozilla/editor/ui/dialogs/content/EdConvertToTable.js
+++ b/mozilla/editor/ui/dialogs/content/EdConvertToTable.js
@@ -31,8 +31,6 @@ function Startup()
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel);
-
gDialog.sepRadioGroup = document.getElementById("SepRadioGroup");
gDialog.sepCharacterInput = document.getElementById("SepCharacterInput");
gDialog.deleteSepCharacter = document.getElementById("DeleteSepCharacter");
@@ -87,7 +85,7 @@ function SelectCharacter(radioGroupIndex)
SetElementEnabledById("CollapseSpaces", gIndex == gSpaceIndex);
}
-function onOK()
+function onAccept()
{
var sepCharacter = "";
switch ( gIndex )
diff --git a/mozilla/editor/ui/dialogs/content/EdConvertToTable.xul b/mozilla/editor/ui/dialogs/content/EdConvertToTable.xul
index ecbd1b1be0d..0e2da1a1b52 100644
--- a/mozilla/editor/ui/dialogs/content/EdConvertToTable.xul
+++ b/mozilla/editor/ui/dialogs/content/EdConvertToTable.xul
@@ -32,10 +32,11 @@
-
@@ -46,8 +47,6 @@
-
-
&instructions1.label;
&instructions2.label;
@@ -66,6 +65,4 @@
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdDialogCommon.js b/mozilla/editor/ui/dialogs/content/EdDialogCommon.js
index d0e553f81fc..ecd0348d378 100644
--- a/mozilla/editor/ui/dialogs/content/EdDialogCommon.js
+++ b/mozilla/editor/ui/dialogs/content/EdDialogCommon.js
@@ -194,11 +194,11 @@ function ValidateNumberRange(value, minValue, maxValue, mustHaveValue)
if (numberStr.length > 0)
{
// We have a number from user outside of allowed range
- message = editorShell.GetString( "ValidateRangeMsg");
+ message = GetString( "ValidateRangeMsg");
message = message.replace(/%n%/, numberStr);
message += "\n ";
}
- message += editorShell.GetString( "ValidateNumberMsg");
+ message += GetString( "ValidateNumberMsg");
// Replace variable placeholders in message with number values
message = message.replace(/%min%/, minValue).replace(/%max%/, maxValue);
@@ -252,7 +252,7 @@ function GetAppropriatePercentString(elementForAtt, elementInDoc)
function AppendStringToMenulistById(menulist, stringID)
{
- return AppendStringToMenulist(menulist, editorShell.GetString(stringID));
+ return AppendStringToMenulist(menulist, GetString(stringID));
}
function AppendStringToMenulist(menulist, string)
@@ -337,7 +337,7 @@ function ClearMenulist(menulist)
function AppendStringToTreelistById(tree, stringID)
{
- return AppendStringToTreelist(tree, editorShell.GetString(stringID));
+ return AppendStringToTreelist(tree, GetString(stringID));
}
function AppendStringToTreelist(tree, string)
diff --git a/mozilla/editor/ui/dialogs/content/EdDialogTemplate.js b/mozilla/editor/ui/dialogs/content/EdDialogTemplate.js
index 9507fa0fa36..c78cfbcdffa 100644
--- a/mozilla/editor/ui/dialogs/content/EdDialogTemplate.js
+++ b/mozilla/editor/ui/dialogs/content/EdDialogTemplate.js
@@ -31,8 +31,6 @@ function Startup()
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel);
-
// gDialog is declared in EdDialogCommon.js
// Set commonly-used widgets like this:
gDialog.fooButton = document.getElementById("fooButton");
@@ -52,7 +50,7 @@ function InitDialog()
// e.g., get attributes from an element for property dialog
}
-function onOK()
+function onAccept()
{
// Validate all user data and set attributes and possibly insert new element here
// If there's an error the user must correct, return false to keep dialog open.
diff --git a/mozilla/editor/ui/dialogs/content/EdDialogTemplate.xul b/mozilla/editor/ui/dialogs/content/EdDialogTemplate.xul
index c1daaef2771..220804f50e7 100644
--- a/mozilla/editor/ui/dialogs/content/EdDialogTemplate.xul
+++ b/mozilla/editor/ui/dialogs/content/EdDialogTemplate.xul
@@ -27,15 +27,13 @@
-
+
-
-
+ onload="Startup()"
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -45,10 +43,4 @@
-
-
-
-
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdDictionary.xul b/mozilla/editor/ui/dialogs/content/EdDictionary.xul
index 595026e1089..63fa31ce755 100644
--- a/mozilla/editor/ui/dialogs/content/EdDictionary.xul
+++ b/mozilla/editor/ui/dialogs/content/EdDictionary.xul
@@ -24,10 +24,10 @@
-
+ ondialogcancel="return onClose();">
@@ -67,9 +67,9 @@
-
+
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdHLineProps.xul b/mozilla/editor/ui/dialogs/content/EdHLineProps.xul
index f041e6384dc..23e258df204 100644
--- a/mozilla/editor/ui/dialogs/content/EdHLineProps.xul
+++ b/mozilla/editor/ui/dialogs/content/EdHLineProps.xul
@@ -32,10 +32,10 @@
diff --git a/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.js b/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.js
index c946718dd47..32dd5fae373 100644
--- a/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.js
+++ b/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.js
@@ -27,8 +27,6 @@ function Startup()
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel); // Map OK/Cancel to relevant functions
-
gDialog.urlInput = document.getElementById("urlInput");
gDialog.targetInput = document.getElementById("targetInput");
gDialog.altInput = document.getElementById("altInput");
@@ -57,7 +55,7 @@ function Startup()
SetWindowLocation();
}
-function onOK()
+function onAccept()
{
dump(window.arguments[0].id+"\n");
window.arguments[0].setAttribute("hsHref", gDialog.urlInput.value);
diff --git a/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.xul b/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.xul
index 0108736d055..f4153e26ab5 100644
--- a/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.xul
+++ b/mozilla/editor/ui/dialogs/content/EdImageMapHotSpot.xul
@@ -29,11 +29,11 @@
-
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -95,7 +95,4 @@
-
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdInsSrc.js b/mozilla/editor/ui/dialogs/content/EdInsSrc.js
index fea849123a8..2f6a5fd19a0 100644
--- a/mozilla/editor/ui/dialogs/content/EdInsSrc.js
+++ b/mozilla/editor/ui/dialogs/content/EdInsSrc.js
@@ -44,8 +44,8 @@ function Startup()
{
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel);
- var okButton = document.getElementById("ok");
+
+ var okButton = document.documentElement.getButton("accept");
if (okButton)
{
okButton.removeAttribute("default");
@@ -65,7 +65,7 @@ function Startup()
SetWindowLocation();
}
-function onOK()
+function onAccept()
{
if (srcInput.value != "")
editorShell.InsertSource(srcInput.value);
diff --git a/mozilla/editor/ui/dialogs/content/EdInsSrc.xul b/mozilla/editor/ui/dialogs/content/EdInsSrc.xul
index edadb8e2990..c7df1d5cc31 100644
--- a/mozilla/editor/ui/dialogs/content/EdInsSrc.xul
+++ b/mozilla/editor/ui/dialogs/content/EdInsSrc.xul
@@ -30,10 +30,11 @@
-
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -43,7 +44,6 @@
-
@@ -59,6 +59,4 @@
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdInsertTable.js b/mozilla/editor/ui/dialogs/content/EdInsertTable.js
index 8bb0df511d6..ca8b1d0bfbe 100644
--- a/mozilla/editor/ui/dialogs/content/EdInsertTable.js
+++ b/mozilla/editor/ui/dialogs/content/EdInsertTable.js
@@ -37,8 +37,6 @@ function Startup()
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel);
-
tableElement = editorShell.CreateElementWithDefaults(tagName);
if(!tableElement)
{
@@ -133,7 +131,7 @@ function ValidateData()
}
-function onOK()
+function onAccept()
{
if (ValidateData())
{
diff --git a/mozilla/editor/ui/dialogs/content/EdInsertTable.xul b/mozilla/editor/ui/dialogs/content/EdInsertTable.xul
index 00572bd947c..e54dd8727d1 100644
--- a/mozilla/editor/ui/dialogs/content/EdInsertTable.xul
+++ b/mozilla/editor/ui/dialogs/content/EdInsertTable.xul
@@ -32,11 +32,11 @@
-
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -46,7 +46,6 @@
-
@@ -84,6 +83,4 @@
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdListProps.js b/mozilla/editor/ui/dialogs/content/EdListProps.js
index 3be402173a2..13c45951555 100644
--- a/mozilla/editor/ui/dialogs/content/EdListProps.js
+++ b/mozilla/editor/ui/dialogs/content/EdListProps.js
@@ -35,8 +35,6 @@ function Startup()
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel);
-
gDialog.ListTypeList = document.getElementById("ListType");
gDialog.BulletStyleList = document.getElementById("BulletStyle");
gDialog.BulletStyleLabel = document.getElementById("BulletStyleLabel");
@@ -314,7 +312,7 @@ function ValidateData()
return true;
}
-function onOK()
+function onAccept()
{
if (ValidateData())
{
diff --git a/mozilla/editor/ui/dialogs/content/EdListProps.xul b/mozilla/editor/ui/dialogs/content/EdListProps.xul
index bf6635f8fbf..be7ecb1d2cf 100644
--- a/mozilla/editor/ui/dialogs/content/EdListProps.xul
+++ b/mozilla/editor/ui/dialogs/content/EdListProps.xul
@@ -28,10 +28,11 @@
-
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -39,7 +40,6 @@
-
@@ -74,7 +74,4 @@
-
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.js b/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.js
index 8a22ae9e69a..7742e5095f5 100644
--- a/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.js
+++ b/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.js
@@ -23,7 +23,6 @@
var insertNew = true;
var tagName = "anchor";
var anchorElement = null;
-var nameInput;
var originalName = "";
// dialog initialization code
@@ -32,9 +31,8 @@ function Startup()
if (!InitEditorShell())
return;
- doSetOKCancel(onOK, onCancel);
-
- nameInput = document.getElementById("nameInput");
+ gDialog.OkButton = document.documentElement.getButton("accept");
+ gDialog.NameInput = document.getElementById("nameInput");
// Get a single selected element of the desired type
anchorElement = editorShell.GetSelectedElement(tagName);
@@ -76,31 +74,31 @@ function Startup()
InitDialog();
DoEnabling();
- SetTextboxFocus(nameInput);
+ SetTextboxFocus(gDialog.NameInput);
SetWindowLocation();
}
function InitDialog()
{
- nameInput.value = globalElement.getAttribute("name");
+ gDialog.NameInput.value = globalElement.getAttribute("name");
}
function ChangeName()
{
- if (nameInput.value.length > 0)
+ if (gDialog.NameInput.value.length > 0)
{
// Replace spaces with "_" and strip other non-URL characters
// Note: we could use ConvertAndEscape, but then we'd
// have to UnEscapeAndConvert beforehand - too messy!
- nameInput.value = ConvertToCDATAString(nameInput.value);
+ gDialog.NameInput.value = ConvertToCDATAString(gDialog.NameInput.value);
}
DoEnabling();
}
function DoEnabling()
{
- var enable = nameInput.value.length > 0;
- SetElementEnabledById("ok", enable);
+ var enable = gDialog.NameInput.value.length > 0;
+ SetElementEnabled(gDialog.OkButton, enable);
SetElementEnabledById("AdvancedEditButton1", enable);
}
@@ -120,11 +118,11 @@ function AnchorNameExists(name)
// Set attributes on globalElement so they can be accessed by AdvancedEdit()
function ValidateData()
{
- var name = TrimString(nameInput.value);
+ var name = TrimString(gDialog.NameInput.value);
if (!name)
{
ShowInputErrorMessage(GetString("MissingAnchorNameError"));
- SetTextboxFocus(nameInput);
+ SetTextboxFocus(gDialog.NameInput);
return false;
} else {
// Replace spaces with "_" and strip other characters
@@ -135,7 +133,7 @@ function ValidateData()
if (originalName != name && AnchorNameExists(name))
{
ShowInputErrorMessage(GetString("DuplicateAnchorNameError").replace(/%name%/,name));
- SetTextboxFocus(nameInput);
+ SetTextboxFocus(gDialog.NameInput);
return false;
}
globalElement.setAttribute("name",name);
@@ -143,7 +141,7 @@ function ValidateData()
return true;
}
-function onOK()
+function onAccept()
{
if (ValidateData())
{
diff --git a/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.xul b/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.xul
index 9ff0130ecbd..f16c55ddaec 100644
--- a/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.xul
+++ b/mozilla/editor/ui/dialogs/content/EdNamedAnchorProps.xul
@@ -32,10 +32,11 @@
-
+ ondialogaccept="return onAccept();"
+ ondialogcancel="return onCancel();">
@@ -44,7 +45,6 @@
-
-
-
-
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdSpellCheck.js b/mozilla/editor/ui/dialogs/content/EdSpellCheck.js
index 3bca1c82e48..438caa22237 100644
--- a/mozilla/editor/ui/dialogs/content/EdSpellCheck.js
+++ b/mozilla/editor/ui/dialogs/content/EdSpellCheck.js
@@ -134,8 +134,8 @@ function InitLanguageMenu(curLang)
regionBundle = null;
}
}
-
- for (var i = 0; i < dictList.length; i++)
+ var i;
+ for (i = 0; i < dictList.length; i++)
{
try {
langId = dictList[i];
@@ -169,7 +169,7 @@ function InitLanguageMenu(curLang)
// we really need to add loacel-aware JS collation, see bug XXXXX
dictList.sort();
- for (var i = 0; i < dictList.length; i++)
+ for (i = 0; i < dictList.length; i++)
{
AppendLabelAndValueToMenulist(gDialog.LanguageMenulist, dictList[i][0], dictList[i][1]);
if (curLang && dictList[i][1] == curLang)
@@ -340,11 +340,11 @@ function IgnoreAll()
function Replace()
{
- newWord = gDialog.ReplaceWordInput.value;
+ var newWord = gDialog.ReplaceWordInput.value;
if (gMisspelledWord && gMisspelledWord != newWord)
{
editorShell.BeginBatchChanges();
- isMisspelled = spellChecker.ReplaceWord(gMisspelledWord, newWord, false);
+ var isMisspelled = spellChecker.ReplaceWord(gMisspelledWord, newWord, false);
editorShell.EndBatchChanges();
}
NextWord();
@@ -352,7 +352,7 @@ function Replace()
function ReplaceAll()
{
- newWord = gDialog.ReplaceWordInput.value;
+ var newWord = gDialog.ReplaceWordInput.value;
if (gMisspelledWord && gMisspelledWord != newWord)
{
editorShell.BeginBatchChanges();
@@ -411,6 +411,7 @@ function FillSuggestedList(misspelledWord)
// Clear the current contents of the list
allowSelectWord = false;
ClearTreelist(list);
+ var item;
if (misspelledWord.length > 0)
{
@@ -432,7 +433,7 @@ function FillSuggestedList(misspelledWord)
if (count == 0)
{
// No suggestions - show a message but don't let user select it
- var item = AppendStringToTreelistById(list, "NoSuggestedWords");
+ item = AppendStringToTreelistById(list, "NoSuggestedWords");
if (item) item.setAttribute("disabled", "true");
allowSelectWord = false;
} else {
@@ -443,7 +444,7 @@ function FillSuggestedList(misspelledWord)
}
else
{
- var item = AppendStringToTreelist(list, "");
+ item = AppendStringToTreelist(list, "");
if (item)
item.setAttribute("disabled", "true");
}
@@ -475,14 +476,16 @@ function doDefault()
else if (gDialog.IgnoreButton.getAttribute("default") == "true")
Ignore();
else if (gDialog.CloseButton.getAttribute("default") == "true")
- onClose();
+ return onClose();
+
+ // Don't close the dialog
+ return false;
}
function onClose()
{
// Shutdown the spell check and close the dialog
spellChecker.UninitSpellChecker();
- SaveWindowLocation();
- window.close();
+ return onCancel();
}
diff --git a/mozilla/editor/ui/dialogs/content/EdSpellCheck.xul b/mozilla/editor/ui/dialogs/content/EdSpellCheck.xul
index 55cebbd8bef..8de3a865abb 100644
--- a/mozilla/editor/ui/dialogs/content/EdSpellCheck.xul
+++ b/mozilla/editor/ui/dialogs/content/EdSpellCheck.xul
@@ -27,10 +27,10 @@
-
+ ondialogcancel="return onClose();">
@@ -114,9 +114,9 @@
-
+
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EdTableProps.js b/mozilla/editor/ui/dialogs/content/EdTableProps.js
index ea879c39a8a..e552efdb0b1 100644
--- a/mozilla/editor/ui/dialogs/content/EdTableProps.js
+++ b/mozilla/editor/ui/dialogs/content/EdTableProps.js
@@ -1257,7 +1257,7 @@ function doHelpButton()
openHelp("chrome://help/content/help.xul?table_properties");
}
-function onOK()
+function onAccept()
{
// Do same as Apply and close window if ValidateData succeeded
var retVal = Apply();
diff --git a/mozilla/editor/ui/dialogs/content/EdTableProps.xul b/mozilla/editor/ui/dialogs/content/EdTableProps.xul
index 76fd819e643..de086545d77 100644
--- a/mozilla/editor/ui/dialogs/content/EdTableProps.xul
+++ b/mozilla/editor/ui/dialogs/content/EdTableProps.xul
@@ -45,7 +45,6 @@
-
diff --git a/mozilla/editor/ui/dialogs/content/EditConflict.js b/mozilla/editor/ui/dialogs/content/EditConflict.js
index 36937e04ee5..507adcae221 100644
--- a/mozilla/editor/ui/dialogs/content/EditConflict.js
+++ b/mozilla/editor/ui/dialogs/content/EditConflict.js
@@ -26,7 +26,6 @@ function Startup()
if (!InitEditorShell())
return;
- //doSetOkCancel(null,PreventCancel);
SetWindowLocation();
}
@@ -36,8 +35,7 @@ dump("KeepCurrentPage\n");
// Simple close dialog and don't change current page
//TODO: Should we force saving of the current page?
SaveWindowLocation();
- window.close();
- return;
+ return true;
}
function UseOtherPage()
@@ -47,7 +45,7 @@ dump("UseOtherPage\n");
//editorShell.LoadUrl(editorShell.editorDocument.location);
setTimeout("editorShell.LoadUrl(editorShell.editorDocument.location)", 10);
SaveWindowLocation();
- window.close();
+ return true;
}
function PreventCancel()
diff --git a/mozilla/editor/ui/dialogs/content/EditConflict.xul b/mozilla/editor/ui/dialogs/content/EditConflict.xul
index d6b8705bc7a..5b0a7f3e50c 100644
--- a/mozilla/editor/ui/dialogs/content/EditConflict.xul
+++ b/mozilla/editor/ui/dialogs/content/EditConflict.xul
@@ -30,10 +30,10 @@
-
+
+
diff --git a/mozilla/editor/ui/dialogs/content/EditorPublishOverlay.xul b/mozilla/editor/ui/dialogs/content/EditorPublishOverlay.xul
index abda1ca548b..d4f2fd6ac50 100644
--- a/mozilla/editor/ui/dialogs/content/EditorPublishOverlay.xul
+++ b/mozilla/editor/ui/dialogs/content/EditorPublishOverlay.xul
@@ -32,7 +32,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
+
@@ -45,7 +45,7 @@
-
+
diff --git a/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.js b/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.js
index 148d6519ed1..f16f63c98b5 100644
--- a/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.js
+++ b/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.js
@@ -40,8 +40,6 @@ function Startup()
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(null, "charsetmenu-selected", "other");
- doSetOKCancel(onOK, onCancel);
-
gDialog.TitleInput = document.getElementById("TitleInput");
gDialog.charsetTree = document.getElementById('CharsetTree');
gDialog.exportToText = document.getElementById('ExportToText');
@@ -84,7 +82,7 @@ function InitDialog()
}
-function onOK()
+function onAccept()
{
editorShell.BeginBatchChanges();
diff --git a/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.xul b/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.xul
index 022e18dda04..d128e4c3950 100644
--- a/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.xul
+++ b/mozilla/editor/ui/dialogs/content/EditorSaveAsCharset.xul
@@ -32,10 +32,11 @@
-
@@ -46,7 +47,6 @@
-
@@ -64,7 +64,4 @@
-
-
-
-
+