From 845066bbe2d0b12c6a08929201b432d08a31c1bd Mon Sep 17 00:00:00 2001 From: "disttsc%bart.nl" Date: Wed, 14 Feb 2001 01:28:54 +0000 Subject: [PATCH] "javascript strict warnings in importDialog.js". bug=60632, author=Mark Olson , r=tonyr, r=chuang, sr=sspitzer git-svn-id: svn://10.0.0.236/trunk@86962 18797224-902f-48f8-a5cc-f745e15eee43 --- .../import/resources/content/importDialog.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mozilla/mailnews/import/resources/content/importDialog.js b/mozilla/mailnews/import/resources/content/importDialog.js index 172dd19a580..7ceaca25c7b 100644 --- a/mozilla/mailnews/import/resources/content/importDialog.js +++ b/mozilla/mailnews/import/resources/content/importDialog.js @@ -64,7 +64,8 @@ function OnLoadImportDialog() progressInfo.importType = null; // look in arguments[0] for parameters - if (window.arguments && window.arguments[0] && window.arguments.importType) + if (window.arguments && window.arguments.length >= 1 && + "importType" in window.arguments[0] && window.arguments[0].importType) { // keep parameters in global for later importType = window.arguments[0].importType; @@ -143,6 +144,7 @@ function ImportDialogOKButton() selectedModuleName = name; if (module) { + var meterText = ""; switch(importType) { case "mail": @@ -164,7 +166,7 @@ function ImportDialogOKButton() return( true); } else { - var meterText = GetFormattedBundleString('MailProgressMeterText', name); + meterText = GetFormattedBundleString('MailProgressMeterText', name); header.setAttribute("description", meterText); progressStatusEl.setAttribute("value", ""); @@ -201,7 +203,7 @@ function ImportDialogOKButton() return( true); } else { - var meterText = GetFormattedBundleString('MailProgressMeterText', name); + meterText = GetFormattedBundleString('MailProgressMeterText', name); header.setAttribute("description", meterText); progressStatusEl.setAttribute("value", ""); @@ -306,13 +308,14 @@ function AddModuleToList(moduleName, index) function ContinueImport( info) { var isMail = info.importType == 'mail' ? true : false; var clear = true; + var deck; if (info.importInterface) { if (!info.importInterface.ContinueImport()) { info.importSuccess = false; clearInterval( info.intervalState); if (info.progressWindow != null) { - var deck = document.getElementById("stateDeck"); + deck = document.getElementById("stateDeck"); deck.setAttribute("index", "3"); info.progressWindow = null; } @@ -341,7 +344,7 @@ function ContinueImport( info) { clearInterval( info.intervalState); info.importSuccess = true; if (info.progressWindow) { - var deck = document.getElementById("stateDeck"); + deck = document.getElementById("stateDeck"); deck.setAttribute("index", "3"); info.progressWindow = null; } @@ -517,7 +520,7 @@ function ImportSettings( module, newAccount, error) { // interesting, we need to return the account that new // mail should be imported into? // that's really only useful for "Upgrade" - var result = setIntf.Import( newAccount); + result = setIntf.Import( newAccount); if (result == false) { error.value = GetBundleString( 'ImportSettingsFailed'); }