fix colorpicker init color

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5834 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2009-03-11 02:26:16 +00:00
parent cc531e7a99
commit 12b3d32430

View file

@ -203,7 +203,7 @@ jQuery(function($){
this.hide();
},
none : function() {
this._target.attr('value','transparent');
this._target.attr('value','transparent').css('background','').css('color','#000000');
this.hide();
}
};
@ -235,13 +235,13 @@ jQuery(function($){
try {
col = tmp.appendTo($('<body>')).css('background-color', col).css('background-color');
} catch(e) {
col = '#FFFFFF';
col = 'transparent';
} finally {
tmp.css('background-color','').remove();
}
if (/^rgb\(([0-9, ]+)\)$/i.test(col)) col = rgb2hex(RegExp.$1.split(/,\s*/));
if (!/#[0-9a-f]{6}/i.test(col)) col = '#FFFFFF';
if (!/#[0-9a-f]{6}/i.test(col)) col = 'transparent';
return col;
}