Added colorpicker column type (#3338)

Renders 30px by 30px square of the selected colour. `type: colorpicker` in the columns config. Credit to @flakerimi
This commit is contained in:
Flakerim Ismani 2018-01-04 19:54:30 +01:00 committed by Luke Towers
parent 0783126249
commit 55ff460895
1 changed files with 7 additions and 1 deletions

View File

@ -1164,7 +1164,13 @@ class Lists extends WidgetBase
return Backend::dateTime($dateTime, $options);
}
/**
* Process as background color, to be seen at list
*/
protected function evalColorPickerTypeValue($record, $column, $value)
{
return '<span style="width:30px; height:30px; display:inline-block; background:'.e($value).'; padding:10px"><span>';
}
/**
* Validates a column type as a date
*/