Project

General

Profile

Actions

Feature #20778

closed

Colorpicker has no usable icon

Added by Stefan Geith over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-07-23
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

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

Colorpicker-before-after.jpg (28.7 KB) Colorpicker-before-after.jpg Administrator Admin, 2009-07-23 13:56
0011576-colorpicker-with-gfx.patch (1.62 KB) 0011576-colorpicker-with-gfx.patch Administrator Admin, 2009-08-04 09:46
colorpicker.gif (290 Bytes) colorpicker.gif Administrator Admin, 2009-08-04 15:53
colorpicker_empty.gif (524 Bytes) colorpicker_empty.gif Administrator Admin, 2009-08-04 15:53
colorpicker.png (475 Bytes) colorpicker.png Administrator Admin, 2009-09-09 12:00
colorpicker_alt.png (460 Bytes) colorpicker_alt.png Administrator Admin, 2009-09-09 12:00
colorpicker_empty.png (1.8 KB) colorpicker_empty.png Administrator Admin, 2009-09-09 12:00
wheel-20x20.png (884 Bytes) wheel-20x20.png Administrator Admin, 2009-09-09 12:21
wheel-20x20.psd (28.5 KB) wheel-20x20.psd Administrator Admin, 2009-09-09 12:21
0011576-colorpicker-v2.patch (1.06 KB) 0011576-colorpicker-v2.patch Administrator Admin, 2009-09-09 13:07
wheel-20x20-default-skin.png (895 Bytes) wheel-20x20-default-skin.png Administrator Admin, 2009-09-09 14:24
T3X_demo_colorpicker-0_0_0.t3x (5.76 KB) T3X_demo_colorpicker-0_0_0.t3x Administrator Admin, 2009-10-20 15:57
Actions #1

Updated by Georg Ringer about 15 years ago

status?

Actions #2

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

Actions #3

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.

Actions #4

Updated by Steffen Kamper over 14 years ago

committed to svn
4_3 rev 7094
trunk rev 7095

Actions

Also available in: Atom PDF