]> _ Git - cubist_cms-back.git/commitdiff
wip #7588 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Jun 2025 11:05:49 +0000 (13:05 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 16 Jun 2025 11:05:49 +0000 (13:05 +0200)
src/app/Magic/Fields/FilesOrURL.php
src/resources/views/fields/color.blade.php

index 4db1772cd3a65c5ddb2c94f0dca5ca92ea2660ed..7154105f7b32db14625510b8bc6f8001b4619738 100644 (file)
@@ -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);
     }
 }
index 27744f34130e818d43684e6cf1b0fd627a5d2b98..2a9f58799a24d3ab359d3b9a3d2fcfcad0919bc8 100644 (file)
                         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');
                             }