diff --git a/editor/ui/composer/content/ComposerCommands.js b/editor/ui/composer/content/ComposerCommands.js index 028ec221dfb7..46fc0d1f0651 100644 --- a/editor/ui/composer/content/ComposerCommands.js +++ b/editor/ui/composer/content/ComposerCommands.js @@ -353,10 +353,18 @@ var nsSaveAsCharsetCommand = { FinishHTMLSource(); window.ok = false; - window.openDialog("chrome://editor/content/EditorSaveAsCharset.xul","_blank", "chrome,close,titlebar,modal") + window.exportToText = false; + window.openDialog("chrome://editor/content/EditorSaveAsCharset.xul","_blank", "chrome,close,titlebar,modal,resizable=yes") if (window.ok) { + if (window.exportToText) + { + window.ok = window.editorShell.saveDocument(true, true, "text/plain"); + } + else + { window.ok = window.editorShell.saveDocument(true, false, window.gDefaultSaveMimeType); + } } window._content.focus(); return window.ok; diff --git a/editor/ui/dialogs/content/EditorSaveAsCharset.js b/editor/ui/dialogs/content/EditorSaveAsCharset.js index 35cc1c8032ce..afa5de7608c3 100644 --- a/editor/ui/dialogs/content/EditorSaveAsCharset.js +++ b/editor/ui/dialogs/content/EditorSaveAsCharset.js @@ -47,6 +47,7 @@ function Startup() dialog = new Object; dialog.TitleInput = document.getElementById("TitleInput"); dialog.charsetTree = document.getElementById('CharsetTree'); + dialog.exportToText = document.getElementById('ExportToText'); //dialog.charsetRoot = document.getElementById('CharsetRoot'); contenttypeElement = GetHTTPEquivMetaElement("content-type"); @@ -106,6 +107,7 @@ function onOK() editorShell.EndBatchChanges(); window.opener.ok = true; + window.opener.exportToText = dialog.exportToText.checked; SaveWindowLocation(); return true; } diff --git a/editor/ui/dialogs/content/EditorSaveAsCharset.xul b/editor/ui/dialogs/content/EditorSaveAsCharset.xul index 2760171ab056..90215340f063 100644 --- a/editor/ui/dialogs/content/EditorSaveAsCharset.xul +++ b/editor/ui/dialogs/content/EditorSaveAsCharset.xul @@ -18,7 +18,7 @@ - Copyright (C) 1998-1999 Netscape Communications Corporation. All - Rights Reserved. - - - Contributor(s): + - Contributor(s): loadrunner@betak.net --> @@ -36,34 +36,35 @@ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" onload = "Startup()" - orient="vertical"> + orient="vertical" + style="width: 32em;"> - -