@ -72,16 +72,9 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
title : BI . i18nText ( "BI-Basic_Auto" )
title : BI . i18nText ( "BI-Basic_Auto" )
} ) ;
} ) ;
this . none . on ( BI . IconButton . EVENT _CHANGE , function ( ) {
this . none . on ( BI . IconButton . EVENT _CHANGE , function ( ) {
if ( this . isSelected ( ) ) {
var value = self . getValue ( ) ;
self . lastColor = self . getValue ( ) ;
self . setValue ( "" ) ;
self . setValue ( "" ) ;
} else {
( value !== "" ) && self . fireEvent ( BI . ColorPickerEditor . EVENT _CHANGE ) ;
self . setValue ( self . lastColor || "#ffffff" ) ;
}
if ( ( self . R . isValid ( ) && self . G . isValid ( ) && self . B . isValid ( ) ) || self . _isEmptyRGB ( ) ) {
self . colorShow . element . css ( "background-color" , self . getValue ( ) ) ;
self . fireEvent ( BI . ColorPickerEditor . EVENT _CHANGE ) ;
}
} ) ;
} ) ;
this . transparent = BI . createWidget ( {
this . transparent = BI . createWidget ( {
@ -94,20 +87,9 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
title : BI . i18nText ( "BI-Transparent_Color" )
title : BI . i18nText ( "BI-Transparent_Color" )
} ) ;
} ) ;
this . transparent . on ( BI . IconButton . EVENT _CHANGE , function ( ) {
this . transparent . on ( BI . IconButton . EVENT _CHANGE , function ( ) {
if ( this . isSelected ( ) ) {
var value = self . getValue ( ) ;
self . lastColor = self . getValue ( ) ;
self . setValue ( "transparent" ) ;
self . setValue ( "transparent" ) ;
} else {
( value !== "transparent" ) && self . fireEvent ( BI . ColorPickerEditor . EVENT _CHANGE ) ;
if ( self . lastColor === "transparent" ) {
self . lastColor = "" ;
}
self . setValue ( self . lastColor || "#ffffff" ) ;
}
if ( ( self . R . isValid ( ) && self . G . isValid ( ) && self . B . isValid ( ) ) ||
self . _isEmptyRGB ( ) ) {
self . colorShow . element . css ( "background-color" , self . getValue ( ) ) ;
self . fireEvent ( BI . ColorPickerEditor . EVENT _CHANGE ) ;
}
} ) ;
} ) ;
BI . createWidget ( {
BI . createWidget ( {