From 78ddfc6c8441dfe961079014b4e89ae5ec7562bd Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Thu, 11 Jan 2001 04:55:33 +0000 Subject: [PATCH] Fix bug 53275 (disable colorpickers in prefs if not 'Custom colors') r=mjudge, sr=sfraser git-svn-id: svn://10.0.0.236/trunk@84785 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/ui/composer/content/pref-composer.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mozilla/editor/ui/composer/content/pref-composer.js b/mozilla/editor/ui/composer/content/pref-composer.js index 9dc7439bdc8..6d71610685c 100644 --- a/mozilla/editor/ui/composer/content/pref-composer.js +++ b/mozilla/editor/ui/composer/content/pref-composer.js @@ -78,7 +78,8 @@ function Startup() if (backgroundImage) dialog.BackgroundImageInput.value = backgroundImage; - if( document.getElementById( "useCustomColors" ).data == 0 ) + // Kinda lame, but "data" attribute value is a string conversion of boolean! + if( document.getElementById( "useCustomColors" ).data == "true" ) UseDefaultColors(); else UseCustomColors(); @@ -152,8 +153,6 @@ function GetColorAndUpdate(ColorWellID) dialog.BackgroundColorData.setAttribute("value", color); break; } -dump(" *** customTextColor="+customTextColor+",customLinkColor="+customLinkColor+", customActiveColor="+customActiveColor+", customVisitedColor="+customVisitedColor+", customBackgroundColor="+customBackgroundColor+"\n"); - setColorWell(ColorWellID, color); SetColorPreview(ColorWellID, color); } @@ -211,7 +210,6 @@ function UseCustomColors() setColorWell("visitedCW", customVisitedColor); setColorWell("backgroundCW", customBackgroundColor); -dump(" *** customTextColor="+customTextColor+",customLinkColor="+customLinkColor+", customActiveColor="+customActiveColor+", customVisitedColor="+customVisitedColor+", customBackgroundColor="+customBackgroundColor+"\n"); dialog.NormalData.setAttribute("value", customTextColor); dialog.LinkData.setAttribute("value", customLinkColor); dialog.ActiveLinkData.setAttribute("value", customActiveColor); @@ -300,7 +298,6 @@ function ValidateAndPreviewImage(ShowErrorMessage) dialog.ColorPreview.setAttribute(styleStr, styleValue); // Set the pref data so pref code saves it -dump(" *** Setting default image ="+backgroundImage+"\n"); dialog.BackgroundImageData.setAttribute("value", backgroundImage ? backgroundImage : ""); }