зеркало из https://github.com/mozilla/gecko-dev.git
Make default HR height 2px, b=76206, r=brade, sr=hewitt
This commit is contained in:
Родитель
0e3dc98bd4
Коммит
9b79802fc2
|
@ -93,7 +93,7 @@ function InitDialog()
|
||||||
dialog.rightAlign.checked = (align == "right");
|
dialog.rightAlign.checked = (align == "right");
|
||||||
dialog.leftAlign.checked = (align == "left");
|
dialog.leftAlign.checked = (align == "left");
|
||||||
|
|
||||||
// This is tricky! Since the "noshade" attribute doesn't have a value,
|
// This is tricky! Since the "noshade" attribute doesn't always have a value,
|
||||||
// we can't use getAttribute to figure out if it's set!
|
// we can't use getAttribute to figure out if it's set!
|
||||||
// This gets the attribute NODE from the attributes NamedNodeMap
|
// This gets the attribute NODE from the attributes NamedNodeMap
|
||||||
if (globalElement.attributes.getNamedItem("noshade"))
|
if (globalElement.attributes.getNamedItem("noshade"))
|
||||||
|
@ -124,6 +124,8 @@ function onSaveDefault()
|
||||||
var percentIndex = width.search(/%/);
|
var percentIndex = width.search(/%/);
|
||||||
var percent;
|
var percent;
|
||||||
var widthInt;
|
var widthInt;
|
||||||
|
var heightInt;
|
||||||
|
|
||||||
if (width)
|
if (width)
|
||||||
{
|
{
|
||||||
if (percentIndex > 0) {
|
if (percentIndex > 0) {
|
||||||
|
@ -139,12 +141,12 @@ function onSaveDefault()
|
||||||
percent = true;
|
percent = true;
|
||||||
widthInt = Number(100);
|
widthInt = Number(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
heightInt = height ? Number(height) : 2;
|
||||||
|
|
||||||
prefs.SetIntPref("editor.hrule.width", widthInt);
|
prefs.SetIntPref("editor.hrule.width", widthInt);
|
||||||
prefs.SetBoolPref("editor.hrule.width_percent", percent);
|
prefs.SetBoolPref("editor.hrule.width_percent", percent);
|
||||||
|
prefs.SetIntPref("editor.hrule.height", heightInt);
|
||||||
// Convert string to number
|
|
||||||
prefs.SetIntPref("editor.hrule.height", Number(height));
|
|
||||||
|
|
||||||
prefs.SetBoolPref("editor.hrule.shading", shading);
|
prefs.SetBoolPref("editor.hrule.shading", shading);
|
||||||
|
|
||||||
// Write the prefs out NOW!
|
// Write the prefs out NOW!
|
||||||
|
@ -185,7 +187,7 @@ function ValidateData()
|
||||||
globalElement.removeAttribute("noshade");
|
globalElement.removeAttribute("noshade");
|
||||||
} else {
|
} else {
|
||||||
shading = false;
|
shading = false;
|
||||||
globalElement.setAttribute("noshade", "");
|
globalElement.setAttribute("noshade", "noshade");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче