Feature #20778
closedColorpicker has no usable icon
0%
Description
If you define a colorpicker for a BE-Field in TCA, and the value of the field is not set to a valid color-value, then you have a clear.gif as a button for the colorpicker.
Normal users will never find the colorpicker like this ...
If a valid color-value is set, then simply a colored area is shown - also this is suboptimal.
Resolution:
If no valid color-value is set, display a real 'colorpicker' icon.
If a vailid color-value is set, overlay color with some 'colorpicker'-icon.
See images attached.
Solution is easy - replace line 3831 of file "class.t3lib_tceforms.php":
'<img src="clear.gif" width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0" />'.
with
(strlen(trim($color))==0 || strcmp(trim($color),'0')==0 ?
'<img src="gfx/colorpicker_empty.jpg" width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0" />' :
'<img src="gfx/colorpicker.gif" width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0" />').
(issue imported from #M11576)
Files
Updated by Stefan Geith about 15 years ago
New patch "colorpicker-v2.patch"
- uses png-fiels instead of gif
- uses t3lib_iconWorks::skinImg() to get images
Updated by Stefan Geith about 15 years ago
Added demo-plugin 'T3X_demo_colorpicker-0_0_0.t3x'.
This adds a field BgColor to the pages-table.
Updated by Steffen Kamper over 14 years ago
committed to svn
4_3 rev 7094
trunk rev 7095