Bring Table dialog to XUL1.0 standards for proper Esc key and button ordering, b=135945, r=neil@parkwaycc.co.uk, sr=kin
git-svn-id: svn://10.0.0.236/trunk@120359 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f480b61d67
commit
2e7fb1b6d9
@ -223,8 +223,6 @@ function Startup()
|
||||
}
|
||||
}
|
||||
|
||||
doSetOKCancel(onAccept, onCancel, 0, onApply);
|
||||
|
||||
// Note: we must use TableElement, not globalTableElement for these,
|
||||
// thus we should not put this in InitDialog.
|
||||
// Instead, monitor desired counts with separate globals
|
||||
@ -266,13 +264,12 @@ function Startup()
|
||||
|
||||
function InitDialog()
|
||||
{
|
||||
// turn on Button3 to be "apply"
|
||||
var applyButton = document.getElementById("Button3");
|
||||
// turn on extra1 to be "apply"
|
||||
var applyButton = document.documentElement.getButton("extra1");
|
||||
if (applyButton)
|
||||
{
|
||||
applyButton.label = GetString("Apply");
|
||||
applyButton.setAttribute("accesskey", GetString("ApplyAccessKey"));
|
||||
applyButton.removeAttribute("collapsed");
|
||||
}
|
||||
|
||||
// Get Table attributes
|
||||
@ -1251,17 +1248,11 @@ function SetCloseButton()
|
||||
// Change text on "Cancel" button after Apply is used
|
||||
if (!ApplyUsed)
|
||||
{
|
||||
document.getElementById("cancel").setAttribute("label",GetString("Close"));
|
||||
document.documentElement.getButton("cancel").setAttribute("label",GetString("Close"));
|
||||
ApplyUsed = true;
|
||||
}
|
||||
}
|
||||
|
||||
function onApply()
|
||||
{
|
||||
Apply();
|
||||
return false; // don't close window
|
||||
}
|
||||
|
||||
function Apply()
|
||||
{
|
||||
if (ValidateData())
|
||||
|
||||
@ -29,12 +29,16 @@
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">
|
||||
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorTableProperties.dtd">
|
||||
|
||||
<window title="&tableWindow.title;"
|
||||
<dialog title="&tableWindow.title;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="Startup()"
|
||||
onunload="onCancel()">
|
||||
buttons="accept,extra1,cancel,help"
|
||||
ondialogaccept="return onAccept();"
|
||||
ondialogextra1="return Apply();"
|
||||
ondialogcancel="return onCancel();"
|
||||
ondialoghelp="return doHelpButton();">
|
||||
|
||||
<!-- Methods common to all editor dialogs -->
|
||||
<script type="application/x-javascript" src="chrome://editor/content/editorUtilities.js"/>
|
||||
@ -264,9 +268,4 @@
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
<spacer class="spacer"/>
|
||||
<!-- from EdDialogOverlay -->
|
||||
<hbox>
|
||||
<spacer flex="1"/>
|
||||
<hbox id="okCancelHelpButtonsRight"/>
|
||||
</hbox>
|
||||
</window>
|
||||
</dialog>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user