fixing various fun regressions from blake's earlier landing, rs=hyatt

This commit is contained in:
hewitt%netscape.com 2001-11-03 11:27:04 +00:00
parent 8c2c4e7079
commit 20311b8044
27 changed files with 38 additions and 65 deletions

View File

@ -87,7 +87,7 @@ function Startup()
gDialog.AddJSEAttributeNameList = document.getElementById("AddJSEAttributeNameList");
gDialog.AddJSEAttributeValueInput = document.getElementById("AddJSEAttributeValueInput");
gDialog.AddJSEAttributeTree = document.getElementById("JSEATree");
gDialog.okButton = document.getElementById("ok");
gDialog.okButton = document.documentElement.getButton("accept");
// build the attribute trees
BuildHTMLAttributeTable();

View File

@ -27,7 +27,7 @@
<?xul-overlay href="chrome://editor/content/EdDialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorPageProperties.dtd">
<!DOCTYPE dialog SYSTEM "chrome://editor/locale/EditorPageProperties.dtd">
<dialog title="&windowTitle.label;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"

View File

@ -407,7 +407,7 @@ function doCustomize() {
// Rather than try to figure out which radio button is currently checked in
// order to uncheck it, we just get all the radio buttons in the group and uncheck them all.
var level = document.getElementById( "P3PLevel" );
var groupElements = document.getElementsByAttribute( "group", "P3PLevel" );
var groupElements = level.getElementsByTagName("radio");
for( var i = 0; i < groupElements.length; i++ ) {
if( groupElements[i] != level && groupElements[i].checked ) {
groupElements[i].checked = false;

View File

@ -24,7 +24,6 @@
<!-- CHANGE THIS WHEN MOVING FILES -->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!-- CHANGE THIS WHEN MOVING FILES -->
<!DOCTYPE window SYSTEM "chrome://communicator/locale/wallet/CookieViewer.dtd" >

View File

@ -188,7 +188,7 @@ function noteSelectionChange(radioItemId)
{
var checkedElem = document.getElementById(radioItemId);
var modeValue = checkedElem.getAttribute("value");
var radioGroup = checkedElem.getAttribute("group");
var radioGroup = checkedElem.radioGroup.getAttribute("id");
switch (radioGroup)
{
case "doFcc" :

View File

@ -40,12 +40,13 @@ function onInit() {
// this is a total hack.
// select the first radio button, assuming the wizard hasn't
// already selected one for us. The wizard can get in this wierd state
var elements = document.getElementsByAttribute("group", "acctyperadio");
var rg = document.getElementById("acctyperadio");
var elements = rg.getElementsByTagName("radio");
var topItem = elements[0];
for (var i=0; i < elements.length; i++)
if (elements[i].checked) topItem = elements[i];
document.getElementById("acctyperadio").selectedItem = topItem;
rg.selectedItem = topItem;
}
function onUnload() {

View File

@ -27,7 +27,6 @@ Contributors:
<?xml-stylesheet href="chrome://messenger/skin/folderPane.css" type="text/css"?>
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://messenger/locale/msgSynchronize.dtd" >
<dialog xmlns:nc="http://home.netscape.com/NC-rdf#"
@ -37,7 +36,9 @@ Contributors:
title="&MsgSelect.label;"
width="450" height="400"
persist="width height"
onload="selectOnLoad();">
onload="selectOnLoad();"
ondialogaccept="return selectOkButton();"
ondialogcancel="return selectCancelButton();">
<script src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mailWindowOverlay.js"/>

View File

@ -104,8 +104,6 @@ function selectCancelButton()
function selectOnLoad()
{
doSetOKCancel(selectOkButton,selectCancelButton);
gMsgWindow = Components.classes[msgWindowContractID].createInstance(Components.interfaces.nsIMsgWindow);
gMsgWindow.SetDOMWindow(window);

View File

@ -32,7 +32,7 @@ function onLoad()
dialog = {};
dialog.OKButton = document.getElementById("ok");
dialog.OKButton = document.documentElement.getButton("accept");
dialog.nameField = document.getElementById("name");
dialog.nameField.focus();

View File

@ -30,7 +30,7 @@ function onLoad()
dialog = {};
dialog.OKButton = document.getElementById("ok");
dialog.OKButton = document.documentElement.getButton("accept");
dialog.nameField = document.getElementById("name");
dialog.nameField.value = arguments.name;

View File

@ -43,7 +43,7 @@ Rights Reserved.
<treechildren flex="1" id="addressWidgetBody">
<treeitem>
<treerow>
<treecell class="treecell-addressingWidget" allowevents="true">
<treecell class="treecell-addressingWidget" allowevents="true" align="stretch">
<menulist id="msgRecipientType#1" class="aw-menulist menulist-compact" flex="1"
onclick="awNotAnEmptyArea(event)" disableonsend="true"
oncommand="awSetAutoComplete(this.id.slice(this.id.lastIndexOf('#') + 1));">
@ -57,8 +57,8 @@ Rights Reserved.
</menupopup>
</menulist>
</treecell>
<treecell class="treecell-addressingWidget" autostretch="never">
<textbox id="msgRecipient#1" class="textbox-addressingWidget"
<treecell class="treecell-addressingWidget">
<textbox id="msgRecipient#1" class="plain textbox-addressingWidget"
type="autocomplete" allowevents="true" flex="1"
searchSessions="addrbook" timeout="300" maxrows="4"
autoFill="true" autoFillAfterMatch="true" forceComplete="true"

View File

@ -148,7 +148,7 @@ function Startup()
//change the button label
var buttonlabels = document.getElementById("okCancelButtons");
element = document.getElementById("ok");
element = document.documentElement.getButton("accept");
element.setAttribute("label", buttonlabels.getAttribute("button1Label"));
element = document.getElementById("cancel");
element.setAttribute("label", buttonlabels.getAttribute("button2Label"));

View File

@ -75,7 +75,7 @@ function OnLoad()
// this is not i18n friendly, fix this
var infotext = downloadHeadersInfoText1 + " " + args.articleCount + " " + downloadHeadersInfoText2;
setText('info',infotext);
var okbutton = document.getElementById("ok");
var okbutton = document.documentElement.getButton("accept");
okbutton.setAttribute("label", okButtonText);
setText("newsgroupLabel", args.groupName);
}

View File

@ -41,7 +41,6 @@
<window
id="profileWindow"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog non-resizable"
title="&windowtitle.label;"
@ -69,9 +68,9 @@
<!-- instructions -->
<deck id="prattle">
<html id="intro" style="width: 17em;border:1px solid transparent;" flex="1">&introgeneral.label;</html>
<description id="intro" style="width: 17em;border:1px solid transparent;" flex="1">&introgeneral.label;</description>
<vbox id="manager">
<html style="width: 17em;" class="label">&pmTextA.label;</html>
<description style="width: 17em;" class="label">&pmTextA.label;</description>
<separator/>
<hbox>
<vbox flex="1" id="managebuttons">

View File

@ -24,7 +24,7 @@
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/turbo.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % turboDialogDTD SYSTEM "chrome://navigator/locale/turboDialog.dtd" >
%turboDialogDTD;
@ -34,10 +34,9 @@
%brandDTD;
]>
<dialog id="turboDialog"
<dialog id="turboDialog" buttons="accept" buttonpack="center"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&exitWarningTitle.label;"
onload="document.getElementById('okButton').focus();"
onunload="SetTurboPref();">
<script type="application/x-javascript">
<![CDATA[
@ -79,12 +78,4 @@
</vbox>
</hbox>
<separator class="thin"/>
<separator class="thin"/>
<hbox>
<spacer flex="1"/>
<button id="okButton" label="&okButton.label;" oncommand="window.close();" default="true"/>
<spacer flex="1"/>
</hbox>
</window>
</dialog>

View File

@ -41,7 +41,7 @@ function onLoad() {
args.zoomOK = false;
dialog = {};
dialog.OKButton = document.getElementById("ok");
dialog.OKButton = document.documentElement.getButton("accept");
dialog.input = document.getElementById("zoomValue");
dialog.input.value = args.value;

View File

@ -41,6 +41,7 @@
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="askViewZoom"
title="&askViewZoom.title;"
ondialogaccept="return onAccept();"
onload="onLoad();">
<script type="application/x-javascript" src="chrome://communicator/content/askViewZoom.js"/>

View File

@ -35,7 +35,7 @@ try {
function onLoad()
{
dialog.input = document.getElementById("dialog.input");
dialog.open = document.getElementById("ok");
dialog.open = document.documentElement.getButton("accept");
dialog.openAppList = document.getElementById("openAppList");
dialog.openTopWindow = document.getElementById("currentWindow");
dialog.openEditWindow = document.getElementById("editWindow");
@ -68,9 +68,6 @@ function onLoad()
// change OK button text to 'open'
dialog.open.label = dialog.bundle.getString("openButtonLabel");
doSetOKCancel(open, 0, 0, 0);
dialog.input.focus();
if (pref) {
try {
var value = pref.getIntPref("general.open_location.last_window_choice");

View File

@ -26,7 +26,6 @@
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
@ -39,6 +38,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&caption.label;"
onload="onLoad()"
ondialogaccept="open()"
style="width: 40em;"
persist="screenX screenY"
screenX="24" screenY="24">
@ -59,8 +59,7 @@
<hbox align="center">
<textbox id="dialog.input" flex="1" type="autocomplete"
searchSessions="history" timeout="50" maxrows="6"
oninput="doEnabling();" ontextcommand="if (userAction == 'scrolling' ||
userAction == 'typing') open();">
oninput="doEnabling();">
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
popupalign="topleft" popupanchor="bottomleft"
onpopupshowing="createUBHistoryMenu(event.target);"

View File

@ -44,7 +44,7 @@ function filepickerLoad() {
gFilePickerBundle = document.getElementById("bundle_filepicker");
textInput = document.getElementById("textInput");
okButton = document.getElementById("ok");
okButton = document.documentElement.getButton("accept");
outlinerView = new nsFileView();
outlinerView.selectionCallback = onSelect;
@ -104,7 +104,6 @@ function filepickerLoad() {
}
// setup the dialogOverlay.xul button handlers
doSetOKCancel(selectOnOK, onCancel);
retvals.buttonStatus = nsIFilePicker.returnCancel;
var outliner = document.getElementById("directoryOutliner");

View File

@ -25,8 +25,6 @@
<?xml-stylesheet href="chrome://communicator/skin/"?>
<?xml-stylesheet href="chrome://communicator/skin/prefpanels.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-applications-edit.dtd">
<dialog id="pickAppHandler"
@ -35,8 +33,10 @@
title="&editType.label;"
onload="Startup();"
ondialogaccept="return onAccept();">
<stringbundle id="bundle_prefApplications"
src="chrome://communicator/locale/pref/pref-applications.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/pref/overrideHandler.js"/>
<script type="application/x-javascript">
<![CDATA[

View File

@ -20,7 +20,6 @@
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/sidebar/customize.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/dialogOverlay.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/pref/pref-charset.dtd" >

View File

@ -58,8 +58,6 @@ function GetBundles()
function Init()
{
doSetOKCancel(AddAvailableLanguage);
try {
GetBundles();
}

View File

@ -90,10 +90,6 @@ nsHelperAppLauncherDialog.prototype= {
html.childNodes[ 0 ].nodeValue = text;
}
// Set up dialog button callbacks.
var object = this;
doSetOKCancel( function () { return object.onOK(); },
function () { return object.onCancel(); } );
moveToAlertPosition();
},
@ -117,8 +113,6 @@ nsHelperAppLauncherDialog.prototype= {
} catch (exception) {
}
}
window.close();
},
// If the user presses cancel, tell the app launcher and close the dialog...
@ -128,9 +122,6 @@ nsHelperAppLauncherDialog.prototype= {
this.appLauncher.Cancel();
} catch( exception ) {
}
// Close up dialog by returning true.
return true;
},
// Enable pick app button if the user chooses that option.

View File

@ -23,7 +23,7 @@
-->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
@ -36,6 +36,8 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&caption.label;"
onload="window.dialog = new nsHelperAppLauncherDialog()"
ondialogaccept="return window.dialog.onOK();"
ondialogcancel="return window.dialog.onCancel();"
style="width: 40em;"
persist="screenX screenY"
screenX="24" screenY="24">
@ -84,6 +86,4 @@
</vbox>
</hbox>
<separator class="groove"/>
</dialog>

View File

@ -53,7 +53,7 @@ function initDialog()
dialog.caseSensitive = document.getElementById("dialog.caseSensitive");
dialog.wrap = document.getElementById("dialog.wrap");
dialog.searchBackwards = document.getElementById("dialog.searchBackwards");
dialog.find = document.getElementById("ok");
dialog.find = document.documentElement.getButton("accept");
dialog.cancel = document.getElementById("cancel");
dialog.fileLabel = document.getElementById("fileLabel");
@ -99,7 +99,7 @@ function initDialog()
dialog.fileInput = document.getElementById("fileInput");
dialog.chooseButton = document.getElementById("chooseFile");
dialog.print = document.getElementById("ok");
dialog.print = document.documentElement.getButton("accept");
dialog.enabled = false;
}

View File

@ -23,12 +23,12 @@ Contributor(s): Masaki Katakai <katakai@japan.sun.com>
Dan Rosen <dr@netscape.com>
-->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://global-platform/locale/printdialog.dtd">
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoad();"
onaccept="return onAccept();"
ondialogaccept="return onAccept();"
title="&printDialog.title;"
persist="screenX screenY"
screenX="24" screenY="24">