Bug 374101 - clean up some strict js warnings and errors

p=Magnus Melin <mkmelin+mozilla@iki.fi>
r+sr=bienvenu
This commit is contained in:
asqueella%gmail.com 2007-03-15 21:40:44 +00:00
Родитель a811888d73
Коммит 545f1f993f
16 изменённых файлов: 41 добавлений и 40 удалений

Просмотреть файл

@ -75,7 +75,7 @@
else
{
// we may be nested inside of a link node
linkNode = event.originalTarget;
var linkNode = event.originalTarget;
while (linkNode && !(linkNode instanceof HTMLAnchorElement))
linkNode = linkNode.parentNode;

Просмотреть файл

@ -210,7 +210,7 @@ function view_init()
}
// hide the views menu item if the user doesn't have the views toolbar button visible
viewsToolbarButton = document.getElementById("mailviews-container");
var viewsToolbarButton = document.getElementById("mailviews-container");
document.getElementById('viewMessageViewMenu').hidden = !viewsToolbarButton;
// Initialize the View Attachment Inline menu

Просмотреть файл

@ -113,7 +113,7 @@ urlListener.prototype = {
// start the alert.
if (!gPendingPreviewFetchRequests)
showAlert();
},
}
}
function onAlertLoad()

Просмотреть файл

@ -431,5 +431,5 @@ var gComposePane = {
try {
document.getElementById('msgcompose.background_color').reset();
} catch (ex) {}
},
}
};

Просмотреть файл

@ -199,5 +199,5 @@ var gConnectionsDialog = {
if (shareProxiesPref.value)
this.updateProtocolPrefs();
return undefined;
},
}
};

Просмотреть файл

@ -109,10 +109,10 @@ var gDisplayPane = {
var tagElToEdit = this.mTagListBox.getItemAtIndex(index);
var args = {result: "", keyToEdit: tagElToEdit.getAttribute("value"), okCallback: editTagCallback};
var dialog = window.openDialog(
"chrome://messenger/content/newTagDialog.xul",
"",
"chrome,titlebar,modal",
args);
"chrome://messenger/content/newTagDialog.xul",
"",
"chrome,titlebar,modal",
args);
}
},
@ -120,11 +120,11 @@ var gDisplayPane = {
{
var args = {result: "", okCallback: addTagCallback};
var dialog = window.openDialog(
"chrome://messenger/content/newTagDialog.xul",
"",
"chrome,titlebar,modal",
args);
},
"chrome://messenger/content/newTagDialog.xul",
"",
"chrome,titlebar,modal",
args);
}
};
function addTagCallback(aName, aColor)

Просмотреть файл

@ -211,5 +211,5 @@ var gGeneralPane = {
soundTypeEl.disabled = soundsDisabled;
document.getElementById('browseForSound').disabled = soundsDisabled || soundTypeEl.value != 1;
document.getElementById('playSound').disabled = soundsDisabled || soundTypeEl.value != 1;
},
}
};

Просмотреть файл

@ -51,8 +51,7 @@
dlgbuttons="accept,cancel"
title="&offlineDialog.title;">
<prefpane id="OfflineSettingsDialogPane" onpaneload="gOfflineDialog.init();">
<prefpane id="OfflineSettingsDialogPane">
<preferences>
<preference id="offline.startup_state" name="offline.startup_state" type="int"/>
<preference id="offline.send.unsent_messages" name="offline.send.unsent_messages" type="int"/>

Просмотреть файл

@ -166,5 +166,5 @@ var gPrivacyPane = {
updateDownloadedPhishingListState: function()
{
document.getElementById('useDownloadedList').disabled = !document.getElementById('enablePhishingDetector').checked;
},
}
};

Просмотреть файл

@ -149,5 +149,5 @@ var gSendOptionsDialog = {
var item = document.createElement('listitem');
item.setAttribute('label', aDomainTitle);
aListBox.appendChild(item);
},
}
};

Просмотреть файл

@ -475,7 +475,7 @@ function DeleteAllFromTree
}
function DeleteSelectedItemFromTree
(tree, view, table, deletedTable, removeButton, removeAllButton) {
(tree, view, table, deletedTable, removeButtonId, removeAllButtonId) {
var box = tree.treeBoxObject;
@ -521,8 +521,8 @@ function DeleteSelectedItemFromTree
box.endUpdateBatch();
// update selection and/or buttons
var removeButton = document.getElementById(removeButton);
var removeAllButton = document.getElementById(removeAllButton);
var removeButton = document.getElementById(removeButtonId);
var removeAllButton = document.getElementById(removeAllButtonId);
if (table.length) {
removeButton.removeAttribute("disabled");

Просмотреть файл

@ -143,10 +143,7 @@ var gFeedSubscriptionsWindow = {
getCellText: function (aIndex, aColumn)
{
var item = this.getItemAtIndex(aIndex);
if (!item)
return "";
else if (aColumn.id == "folderNameCol")
return item.name;
return (item && aColumn.id == "folderNameCol") ? item.name : "";
},
_selection: null,
@ -473,7 +470,7 @@ var gFeedSubscriptionsWindow = {
document.getElementById('locationValue').value = "";
}
for (i = 0; i < ids.length; ++i)
for (var i = 0; i < ids.length; ++i)
document.getElementById(ids[i]).disabled = !aItem || aItem.container;
},
@ -814,7 +811,7 @@ var gFeedSubscriptionsWindow = {
onProgress: function(feed, aProgress, aProgressMax)
{
updateStatusItem('progressMeter', (aProgress * 100) / aProgressMax);
},
}
},
exportOPML: function()
@ -948,14 +945,18 @@ var gFeedSubscriptionsWindow = {
var parser = new DOMParser();
opmlDom = parser.parseFromStream(stream, null, stream.available(), 'application/xml');
}catch(e){
return promptService.alert(window, null, this.mBundle.getString("subscribe-errorOpeningFile"));
promptService.alert(window, null, this.mBundle.getString("subscribe-errorOpeningFile"));
return;
}finally{
stream.close();
}
// return if the user didn't give us an OPML file
if(!opmlDom || !(opmlDom.documentElement.tagName == "opml"))
return promptService.alert(window, null, this.mBundle.getFormattedString("subscribe-errorInvalidOPMLFile", [rv.file.leafName]));
{
promptService.alert(window, null, this.mBundle.getFormattedString("subscribe-errorInvalidOPMLFile", [rv.file.leafName]));
return;
}
var outlines = opmlDom.getElementsByTagName("body")[0].getElementsByTagName("outline");
var feedsAdded = false;
@ -1004,7 +1005,10 @@ var gFeedSubscriptionsWindow = {
}
if (!outlines.length || !feedsAdded)
return promptService.alert(window, null, this.mBundle.getFormattedString("subscribe-errorInvalidOPMLFile", [rv.file.leafName]));
{
promptService.alert(window, null, this.mBundle.getFormattedString("subscribe-errorInvalidOPMLFile", [rv.file.leafName]));
return;
}
//add the new feeds to our view
refreshSubscriptionView();
@ -1022,9 +1026,7 @@ var gFeedSubscriptionsWindow = {
outlineTitle = anOutline.getAttribute("xmlUrl");
return outlineTitle;
},
}
};
// opens the feed properties dialog

Просмотреть файл

@ -126,7 +126,7 @@ function buildServerFilterMenuList()
var ispDirectories = fileLocator.get(KEY_ISP_DIRECTORY_LIST, Components.interfaces.nsISimpleEnumerator);
while (ispDirectories.hasMoreElements())
{
ispDirectory = ispDirectories.getNext().QueryInterface(Components.interfaces.nsIFile);
var ispDirectory = ispDirectories.getNext().QueryInterface(Components.interfaces.nsIFile);
if (ispDirectory)
buildServerFilterListFromDir(ispDirectory);
}

Просмотреть файл

@ -76,9 +76,9 @@ function BrowseForLocalFolders()
return;
}
}
// convert the nsILocalFile into a nsIFileSpec
currentFolderTextBox.value = fp.file.path;
}
// convert the nsILocalFile into a nsIFileSpec
currentFolderTextBox.value = fp.file.path;
}
function hostnameIsIllegal(hostname)

Просмотреть файл

@ -108,7 +108,7 @@ function onOKEditTag()
}
tagService.setColorForKey(dialog.editTagKey, document.getElementById("tagColorPicker").color);
dialog.okCallback();
return dialog.okCallback();
}
/**
@ -127,7 +127,7 @@ function onOKNewTag()
return false;
}
else
dialog.okCallback(name, document.getElementById("tagColorPicker").color);
return dialog.okCallback(name, document.getElementById("tagColorPicker").color);
}
/**

Просмотреть файл

@ -149,7 +149,7 @@ pref("mail.pop3.deleteFromServerOnMove", false);
pref("mail.remember_password", false);
pref("mail.pop_password", "");
pref("mail.fixed_width_messages", true);
pref("mail.citation_color", ""); // quoted color
pref("mail.citation_color", "#000000"); // quoted color
pref("mail.quoted_style", 0); // 0=plain, 1=bold, 2=italic, 3=bolditalic
pref("mail.quoted_size", 0); // 0=normal, 1=big, 2=small
pref("mail.quoted_graphical", true); // use HTML-style quoting for displaying plain text