]> _ Git - cubist_cms-back.git/commitdiff
wip #3511
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Mar 2020 13:01:37 +0000 (14:01 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Mar 2020 13:01:37 +0000 (14:01 +0100)
src/resources/views/fields/dropzone_media.blade.php

index c48afcd81ed802a6fef06969136f5c61e0943b3a..098dea2dfd2794fe77c455665e8f365fa7cd2965 100644 (file)
@@ -207,7 +207,11 @@ $baseUrl = url($crud->route . '/' . $entry->id . '/media');
 
                     $(document).on('click', '[data-dz-alt]', function () {
                         var baseUrl = $(this).closest('.dropzone').attr('data-url');
-                        var t = window.prompt($(this).attr('title'), $(this).closest('[data-alt]').attr('data-alt'));
+                        var defaultAlt = $(this).closest('[data-alt]').attr('data-alt');
+                        if (defaultAlt === undefined || defaultAlt === null || defaultAlt === 'null') {
+                            defaultAlt = '';
+                        }
+                        var t = window.prompt($(this).attr('title'), defaultAlt);
                         var mediaId = $(this).closest('[data-id]').attr('data-id');
                         if (t) {
                             $(this).closest('[data-alt]').attr('data-alt', t);