More setting of presentational attributes that should use the CSS equivalent

stuff.  Bug 239476, r=glazman, sr=peterv
This commit is contained in:
bzbarsky%mit.edu 2004-08-04 21:21:26 +00:00
Родитель debcc046a2
Коммит d179ca744c
2 изменённых файлов: 21 добавлений и 7 удалений

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

@ -404,13 +404,14 @@ function ValidateData()
// from windows, but I don't know how to do that!
var tmpColor = customTextColor.toLowerCase();
if (tmpColor != "windowtext")
globalElement.setAttribute(textStr, customTextColor);
editor.setAttributeOrEquivalent(globalElement, textStr,
customTextColor, true);
else
editor.removeAttributeOrEquivalent(globalElement, textStr, true);
tmpColor = customBackgroundColor.toLowerCase();
if (tmpColor != "window")
globalElement.setAttribute(bgcolorStr, customBackgroundColor);
editor.setAttributeOrEquivalent(globalElement, bgcolorStr, customBackgroundColor, true);
else
editor.removeAttributeOrEquivalent(globalElement, bgcolorStr, true);

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

@ -502,7 +502,10 @@ function SetColor(ColorWellID, color)
{
if (color)
{
globalCellElement.setAttribute(bgcolor, color);
try {
gActiveEditor.setAttributeOrEquivalent(globalCellElement, bgcolor,
color, true);
} catch(e) {}
gDialog.CellInheritColor.collapsed = true;
}
else
@ -518,7 +521,10 @@ function SetColor(ColorWellID, color)
{
if (color)
{
globalTableElement.setAttribute(bgcolor, color);
try {
gActiveEditor.setAttributeOrEquivalent(globalTableElement, bgcolor,
color, true);
} catch(e) {}
gDialog.TableInheritColor.collapsed = true;
}
else
@ -801,10 +807,14 @@ function SetAlign(listID, defaultValue, element, attName)
{
try {
gActiveEditor.removeAttributeOrEquivalent(element, attName, true);
} catch(e) {}
} catch(e) {}
}
else
element.setAttribute(attName, value);
{
try {
gActiveEditor.setAttributeOrEquivalent(element, attName, value, true);
} catch(e) {}
}
}
function ValidateTableData()
@ -908,7 +918,10 @@ function ValidateCellData()
if (gDialog.TextWrapCheckbox.checked)
{
if (gDialog.TextWrapList.value == "nowrap")
globalCellElement.setAttribute("nowrap","nowrap");
try {
gActiveEditor.setAttributeOrEquivalent(globalCellElement, "nowrap",
"nowrap", true);
} catch(e) {}
else
try {
gActiveEditor.removeAttributeOrEquivalent(globalCellElement, "nowrap", true);