mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
bug 33926, r=cmanske, sr=blizzard
This commit is contained in:
parent
33c326091d
commit
299c0f02df
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
- Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- Contributor(s): loadrunner@betak.net
|
||||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
|
||||
@ -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;">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
|
||||
<script type="application/x-javascript" src="chrome://editor/content/EditorSaveAsCharset.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js" />
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
|
||||
<script type="application/x-javascript" src="chrome://editor/content/EditorSaveAsCharset.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/dialogOverlay.js" />
|
||||
|
||||
<spring id="location" offsetY="50" persist="offsetX offsetY"/>
|
||||
<broadcaster id="args" value=""/>
|
||||
<keyset id="dialogKeys"/>
|
||||
|
||||
<spring id="location" offsetY="50" persist="offsetX offsetY"/>
|
||||
<broadcaster id="args" value=""/>
|
||||
<keyset id="dialogKeys"/>
|
||||
|
||||
<box orient="vertical">
|
||||
<titledbox orient="vertical"><label align="left" value="&documentTitleTitle.label;"/>
|
||||
<!-- Text labels filled in from editor.properties -->
|
||||
<text id="EnterTitleLabel" class="label"/>
|
||||
<textbox id="TitleInput" flex="1" oninput="TitleChanged();"/>
|
||||
<html id="TitleHelp" class="label wrap" style="width:1em" flex="1"/>
|
||||
<!-- Text labels filled in from editor.properties -->
|
||||
<text id="EnterTitleLabel" class="label"/>
|
||||
<textbox id="TitleInput" oninput="TitleChanged();"/>
|
||||
<html id="TitleHelp" class="label wrap" style="width:1em" />
|
||||
</titledbox>
|
||||
|
||||
<titledbox orient="vertical"><label value="&documentCharsetTitle.label;"/>
|
||||
<text class="label" value="&documentCharsetDesc.label;"/>
|
||||
<box flex="1">
|
||||
<tree class="list" id="CharsetTree" rows="10" flex="1" onselect="SelectCharset();">
|
||||
<treecolgroup><treecol flex="1"/></treecolgroup>
|
||||
<titledbox orient="vertical" flex="1"><label value="&documentCharsetTitle.label;"/>
|
||||
<text class="label" value="&documentCharsetDesc.label;"/>
|
||||
<tree class="list" id="CharsetTree" rows="7" flex="1" onselect="SelectCharset();">
|
||||
<treecolgroup><treecol flex="1"/></treecolgroup>
|
||||
</tree>
|
||||
</box>
|
||||
</titledbox>
|
||||
</box>
|
||||
<!-- from global dialogOverlay -->
|
||||
<box id="okCancelButtons"/>
|
||||
|
||||
<checkbox id="ExportToText" label="&documentExportToText.label;" />
|
||||
<separator class="groove"/>
|
||||
|
||||
<!-- from global dialogOverlay -->
|
||||
<box id="okCancelButtons"/>
|
||||
</window>
|
||||
|
@ -29,6 +29,7 @@
|
||||
<!ENTITY documentTitleTitle.label "Page Title">
|
||||
<!ENTITY documentCharsetTitle.label "Character Set">
|
||||
<!ENTITY documentCharsetDesc.label "Select the charset you want to save as:">
|
||||
<!ENTITY documentExportToText.label "Export to Text">
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user