backing out patch for bug 111396 because it caused smoketest blocker bug 112643

This commit is contained in:
morse%netscape.com 2001-11-29 20:52:48 +00:00
parent d0f1adf983
commit d449c7f61a
2 changed files with 23 additions and 41 deletions

View File

@ -42,6 +42,7 @@ var gCommonDialogParam;
function commonDialogOnLoad()
{
doSetOKCancel(commonDialogOnOK, commonDialogOnCancel, commonDialogOnButton2, commonDialogOnButton3);
gCommonDialogParam = window.arguments[0].QueryInterface(Components.interfaces.nsIDialogParamBlock);
// display the main text
@ -72,44 +73,28 @@ function commonDialogOnLoad()
// set the number of command buttons
var nButtons = gCommonDialogParam.GetInt(2);
var string;
if (nButtons == 1) hideElementById("cancel");
switch (nButtons) {
case 4:
string = gCommonDialogParam.GetString(11);
if (string)
document.getElementById("Button3").label = string;
unHideElementByID("Button3");
document.getElementById("Button3").label = gCommonDialogParam.GetString(11);
// fall through
case 3:
string = gCommonDialogParam.GetString(10);
if (string)
document.getElementById("Button2").label = string;
unHideElementByID("Button2");
document.getElementById("Button2").label = gCommonDialogParam.GetString(10);
// fall through
default:
case 2:
var string = gCommonDialogParam.GetString(8);
if (string)
document.getElementById("ok").label = string;
// fall through
case 1:
string = gCommonDialogParam.GetString(9);
if (string)
document.getElementById("cancel").label = string;
// fall through
case 1:
string = gCommonDialogParam.GetString(8);
if (string)
document.getElementById("ok").label = string;
break;
}
switch (nButtons) {
case 1:
hideElementById("cancel");
// fall through
default:
case 2:
hideElementById("Button2");
// fall through
case 3:
hideElementById("Button3");
// fall through
case 4:
break;
}
// initialize the checkbox
setCheckbox(gCommonDialogParam.GetString(1), gCommonDialogParam.GetInt(1));

View File

@ -1,13 +1,15 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<dialog id="commonDialog"
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://global/locale/commonDialog.dtd">
<window id="commonDialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="commonDialogOnLoad();"
ondialogaccept="return commonDialogOnOK();"
ondialogcancel="return commonDialogOnCancel();"
style="min-width: 29em; min-height: 8.5em; -moz-user-focus: ignore;">
style="min-width: 29em; min-height: 8.5em; -moz-user-focus: ignore;"
class="dialog">
<script type="application/x-javascript" src="chrome://global/content/commonDialog.js"/>
<keyset id="dialogKeys"/>
@ -24,17 +26,17 @@
<!-- edit fields -->
<vbox id="loginEditField" collapsed="true">
<label id="login.text" control="dialog.loginname"/>
<label id="login.text" value="&editfield0.label;" control="dialog.loginname"/>
<textbox tabindex="0" id="dialog.loginname" flex="1"/>
<separator class="thin"/>
</vbox>
<vbox id ="password1EditField" collapsed="true">
<label id="password1.text" control="dialog.password1"/>
<label id="password1.text" value="&editfield1.label;" control="dialog.password1"/>
<textbox tabindex="1" type="password" id="dialog.password1" flex="1"/>
<separator class="thin"/>
</vbox>
<vbox id="password2EditField" collapsed="true">
<label id="password2.text" control="dialog.password2"/>
<label id="password2.text" value="&editfield2.label;" control="dialog.password2"/>
<textbox tabindex="1" type="password" id="dialog.password2" flex="1"/>
<separator class="thin"/>
</vbox>
@ -49,11 +51,6 @@
</hbox>
<separator class="thin"/>
<hbox id="okCancelButtons"/>
<hbox align="right">
<button id="ok" dlgtype="accept"/>
<button id="Button2" oncommand="commonDialogOnButton2();"/>
<button id="Button3" oncommand="commonDialogOnButton3();"/>
<button id="cancel" dlgtype="cancel"/>
</hbox>
</dialog>
</window>