More tweaks to prefs dialog b=47704, r=ben
git-svn-id: svn://10.0.0.236/trunk@79308 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
246377bde6
commit
0c989e936a
@ -16,7 +16,7 @@ var customActiveColor;
|
||||
var customVisitedColor;
|
||||
var customBackgroundColor;
|
||||
var previewBGColor;
|
||||
var backgroundImage;
|
||||
var backgroundImage = "";
|
||||
|
||||
// Strings we use often
|
||||
var styleStr = "style";
|
||||
@ -75,7 +75,6 @@ function Startup()
|
||||
customVisitedColor = dialog.VisitedLinkData.getAttribute("value");
|
||||
customBackgroundColor = dialog.BackgroundColorData.getAttribute("value");
|
||||
backgroundImage = dialog.BackgroundImageData.getAttribute("value");
|
||||
dump(" *** customTextColor="+customTextColor+",customLinkColor="+customLinkColor+", customActiveColor="+customActiveColor+", customVisitedColor="+customVisitedColor+", customBackgroundColor="+customBackgroundColor+"\n");
|
||||
if (backgroundImage)
|
||||
dialog.BackgroundImageInput.value = backgroundImage;
|
||||
|
||||
@ -285,7 +284,7 @@ function ValidateAndPreviewImage(ShowErrorMessage)
|
||||
}
|
||||
else
|
||||
{
|
||||
backgroundImage = null;
|
||||
backgroundImage = "";
|
||||
if (ShowErrorMessage)
|
||||
{
|
||||
SetTextfieldFocus(dialog.BackgroundImageInput);
|
||||
@ -295,12 +294,13 @@ function ValidateAndPreviewImage(ShowErrorMessage)
|
||||
}
|
||||
}
|
||||
else
|
||||
backgroundImage = null;
|
||||
backgroundImage = "";
|
||||
|
||||
// Set style on preview (removes image if not valid)
|
||||
dialog.ColorPreview.setAttribute(styleStr, styleValue);
|
||||
|
||||
// Set the pref data so pref code saves it
|
||||
document.getElementById("backgroundImageData").setAttribute("value", backgroundImage);
|
||||
dump(" *** Setting default image ="+backgroundImage+"\n");
|
||||
dialog.BackgroundImageData.setAttribute("value", backgroundImage ? backgroundImage : "");
|
||||
}
|
||||
|
||||
|
||||
@ -158,8 +158,7 @@
|
||||
|
||||
<text class="label" value="&backgroundImage.label;" accesskey="&backgroundImage.accesskey;"/>
|
||||
<box valign="middle" autostretch="never">
|
||||
<textfield id="BackgroundImageInput" onkeyup="ChangeBackgroundImage()"
|
||||
style="min-width : 12em"/>
|
||||
<textfield id="BackgroundImageInput" onkeyup="ChangeBackgroundImage()" style="min-width : 16em"/>
|
||||
<button class="dialog" value="&chooseFile.label;" accesskey="&chooseFile.accesskey;"
|
||||
oncommand="ChooseImageFile()"/>
|
||||
<data id="backgroundImageData" pref="true" preftype="string" prefstring="editor.default_background_image" prefattribute="value"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user