From c9b0258029d1799e9ecf50b32d89fbcb509f6053 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 26 Oct 2010 12:55:13 +0200 Subject: [PATCH] Backed out changeset 1769b8307bde (bug 575485). a=backout --- .../prompts/content/commonDialog.js | 116 +++++++++++------- .../prompts/content/commonDialog.xul | 18 ++- .../prompts/content/selectDialog.js | 8 +- .../prompts/content/selectDialog.xul | 8 +- 4 files changed, 87 insertions(+), 63 deletions(-) diff --git a/toolkit/components/prompts/content/commonDialog.js b/toolkit/components/prompts/content/commonDialog.js index 72609c16a68f..10bab3cca360 100644 --- a/toolkit/components/prompts/content/commonDialog.js +++ b/toolkit/components/prompts/content/commonDialog.js @@ -46,17 +46,17 @@ const Cu = Components.utils; Cu.import("resource://gre/modules/Services.jsm"); -let gArgs, promptType, numButtons, iconClass, soundID, hasInputField = true; -let gDelayExpired = false, gBlurred = false; +let gArgs = window.arguments[0].QueryInterface(Ci.nsIWritablePropertyBag2) + .QueryInterface(Ci.nsIWritablePropertyBag); + +let promptType, numButtons, iconClass, soundID, hasInputField = true; + function earlyInit() { // This is called before onload fires, so we can't be certain that any elements // in the document have their bindings ready, so don't call any methods/properties // here on xul elements that come from xbl bindings. - gArgs = window.arguments[0].QueryInterface(Ci.nsIWritablePropertyBag2) - .QueryInterface(Ci.nsIWritablePropertyBag); - promptType = gArgs.getProperty("promptType"); switch (promptType) { @@ -124,7 +124,7 @@ function initTextbox(aName, aValue) { document.getElementById(aName + "Textbox").setAttribute("value", aValue); } -function setLabelForNode(aNode, aLabel) { +function setLabelForNode(aNode, aLabel, aIsLabelFlag) { // This is for labels which may contain embedded access keys. // If we end in (&X) where X represents the access key, optionally preceded // by spaces and/or followed by the ':' character, store the access key and @@ -145,7 +145,11 @@ function setLabelForNode(aNode, aLabel) { // && is the magic sequence to embed an & in your label. aLabel = aLabel.replace(/\&\&/g, "&"); - aNode.label = aLabel; + if (aIsLabelFlag) { // Set text for