From cef4e4c317a6d33040ce2e45cf342782a3a43237 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 16 Jun 2025 13:05:49 +0200 Subject: [PATCH] wip #7588 @0.5 --- src/app/Magic/Fields/FilesOrURL.php | 3 +-- src/resources/views/fields/color.blade.php | 11 +++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/Magic/Fields/FilesOrURL.php b/src/app/Magic/Fields/FilesOrURL.php index 4db1772..7154105 100644 --- a/src/app/Magic/Fields/FilesOrURL.php +++ b/src/app/Magic/Fields/FilesOrURL.php @@ -30,7 +30,6 @@ class FilesOrURL extends Field if (is_array($accept)) { $accept = implode(', ', $accept); } - $accept = str_replace('*.', '.', $accept); - return $accept; + return str_replace('*.', '.', $accept); } } diff --git a/src/resources/views/fields/color.blade.php b/src/resources/views/fields/color.blade.php index 27744f3..2a9f587 100644 --- a/src/resources/views/fields/color.blade.php +++ b/src/resources/views/fields/color.blade.php @@ -62,18 +62,21 @@ if ($(this).closest('.sample').length > 0) { return; } - var e=$(this); - var options={ + var e = $(this); + var options = { preferredFormat: "hex3", showInitial: true, showInput: true, allowEmpty: true, showAlpha: $(this).attr('data-show-alpha') === 'true', - move:function(color){ + move: function (color) { + if (null === 'color') { + color = ''; + } e.val(color.toString()); e.trigger('change'); }, - dragend:function(color){ + dragend: function (color) { e.val(color.toString()); e.trigger('change'); } -- 2.39.5