diff --git a/suite/mailnews/compose/MsgComposeCommands.js b/suite/mailnews/compose/MsgComposeCommands.js index 6d473ff1bf..c77f33ed47 100644 --- a/suite/mailnews/compose/MsgComposeCommands.js +++ b/suite/mailnews/compose/MsgComposeCommands.js @@ -59,8 +59,8 @@ const mozISpellCheckingEngine = Components.interfaces.mozISpellCheckingEngine; * static globals, need to be initialized only once */ var sMsgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService(Components.interfaces.nsIMsgComposeService); -var sComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); -var sBrandBundle = document.getElementById("brandBundle"); +var sComposeMsgsBundle; +var sBrandBundle; var sPrefs = null; var sPrefBranchInternal = null; @@ -1458,6 +1458,9 @@ function WizCallback(state) function ComposeLoad() { + sComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); + sBrandBundle = document.getElementById("brandBundle"); + // First get the preferences service try { var prefService = Components.classes["@mozilla.org/preferences-service;1"] diff --git a/suite/mailnews/mail3PaneWindowCommands.js b/suite/mailnews/mail3PaneWindowCommands.js index 9faa5f7aa2..ccd3e24e34 100644 --- a/suite/mailnews/mail3PaneWindowCommands.js +++ b/suite/mailnews/mail3PaneWindowCommands.js @@ -40,7 +40,6 @@ * ***** END LICENSE BLOCK ***** */ var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); -var gMessengerBundle = document.getElementById("bundle_messenger"); // Controller object for folder pane var FolderPaneController = diff --git a/suite/mailnews/mailWindowOverlay.js b/suite/mailnews/mailWindowOverlay.js index bc6cfe7d04..75b684ae10 100644 --- a/suite/mailnews/mailWindowOverlay.js +++ b/suite/mailnews/mailWindowOverlay.js @@ -2639,8 +2639,6 @@ var gMessageNotificationBar = 8 // 1 << (kMsgNotificationMDN - 1) ], - mMsgNotificationBar: document.getElementById('msgNotificationBar'), - setJunkMsg: function(aMsgHdr) { var isJunk = false; @@ -2687,8 +2685,9 @@ var gMessageNotificationBar = clearMsgNotifications: function() { this.mBarStatus = 0; - this.mMsgNotificationBar.selectedIndex = 0; - this.mMsgNotificationBar.collapsed = true; + var msgNotificationBar = document.getElementById('msgNotificationBar'); + msgNotificationBar.selectedIndex = 0; + msgNotificationBar.collapsed = true; }, // private method used to set our message notification deck to the correct value... @@ -2700,9 +2699,10 @@ var gMessageNotificationBar = // the phishing message takes precedence over the junk message // which takes precedence over the remote content message - this.mMsgNotificationBar.selectedIndex = this.mBarFlagValues.indexOf(status & -status); + var msgNotificationBar = document.getElementById('msgNotificationBar'); + msgNotificationBar.selectedIndex = this.mBarFlagValues.indexOf(status & -status); - this.mMsgNotificationBar.collapsed = !status; + msgNotificationBar.collapsed = !status; }, /**