Fixed the problem which prevented to put a check mark for reply charset, bug 28055, r=cata, a=bobj.

This commit is contained in:
nhotta%netscape.com 2000-02-17 03:27:29 +00:00
Родитель 998f0409c2
Коммит 39aee41f80
1 изменённых файлов: 8 добавлений и 7 удалений

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

@ -399,19 +399,20 @@ function InitCharsetMenuCheckMark()
prefs = null;
}
var send_default_charset = prefs.CopyCharPref("mailnews.send_default_charset");
var compFieldsCharset = msgCompose.compFields.GetCharacterSet();
if (compFieldsCharset.toUpperCase() == "US-ASCII")
compFieldsCharset = compFieldsCharset.toUpperCase();
if (compFieldsCharset == "US-ASCII")
compFieldsCharset = "ISO-8859-1";
send_default_charset = send_default_charset.toUpperCase();
menuitem = document.getElementById(compFieldsCharset);
// charset may have been set implicitly in case of reply/forward
if (send_default_charset.toUpperCase() != compFieldsCharset.toUpperCase()) {
if (menuitem && menuitem.getAttribute('checked') == false) {
if (send_default_charset != compFieldsCharset) {
menuitem.setAttribute('checked', 'true');
return;
}
}
// use pref default
menuitem = document.getElementById(send_default_charset);
if (menuitem)
menuitem.setAttribute('checked', 'true');