Bug 855657 - Follow-up comments for bug 838705. r=enndeakin

This commit is contained in:
Mounir Lamouri 2013-03-28 18:12:24 +00:00
parent b14c57f2e8
commit 4ccc8f4cf3

View File

@ -572,12 +572,16 @@
let files = tipElement.files; let files = tipElement.files;
if (files.length == 0) { if (files.length == 0) {
var bundle = Services.strings.createBundle("chrome://global/locale/layout/HtmlForm.properties"); try {
if (tipElement.multiple) { var bundle = Components.classes['@mozilla.org/intl/stringbundle;1']
titleText = bundle.GetStringFromName("NoFilesSelected"); .getService(Components.interfaces.nsIStringBundleService)
} else { .createBundle("chrome://global/locale/layout/HtmlForm.properties");
titleText = bundle.GetStringFromName("NoFileSelected"); if (tipElement.multiple) {
} titleText = bundle.GetStringFromName("NoFilesSelected");
} else {
titleText = bundle.GetStringFromName("NoFileSelected");
}
} catch(e) {}
} else { } else {
titleText = files[0].name; titleText = files[0].name;
for (let i=1; i<files.length; ++i) { for (let i=1; i<files.length; ++i) {