[TYPO3-dev] 0011576: Colorpicker has no usable icon
Stefan Geith
typo3dev2008.nospam1 at geithware.de
Thu Jul 23 14:02:45 CEST 2009
Hi devs,
I recently used the colorpicker and discovered, that usability is not
optimal:
Problem:
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.
Solution could be:
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.
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" />').
See
http://bugs.typo3.org/file_download.php?file_id=7912&type=bug
for Screenshot of old and suggested Version.
Please give some feedback about code an icons, then I will create a
patch and post it to the core-list.
Thank you !
/Stefan Geith
More information about the TYPO3-dev
mailing list