Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FieldtypeColorPicker.module
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FieldtypeColorPicker extends Fieldtype {
*
*/
public function getBlankValue(Page $page, Field $field) {
if($field->default == "0") $field->default = "000000";
if($field->default === "0") $field->default = "000000";
return $field->default ? $field->default : '';
}

Expand Down Expand Up @@ -62,7 +62,7 @@ class FieldtypeColorPicker extends Fieldtype {
if(!$field->formatting) return $value;

if("transp" == strtolower($value)) return self::TRANSPARENT;
if($value == "0") $value = "000000";
if($value === "0") $value = "000000";

return self::HEX_PREFIX . $value;
}
Expand Down
6 changes: 6 additions & 0 deletions colorpicker/css/colorpicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,9 @@
.colorpicker_slider {
background-position: bottom;
}


.colorpicker_loaded:has(+ input:not([value])),
.colorpicker_loaded:has(+ input[value=""]) {
background: linear-gradient(-45deg, white 47%, red 48%, red 52%, white 53%) !important;
}