From: Vincent Vanwaelscappel Date: Thu, 27 Jun 2019 17:37:13 +0000 (+0200) Subject: #2843 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0db776d6bc50c1b18a482da9a21023c94d980230;p=cubist_cms-back.git #2843 --- diff --git a/src/app/Magic/Fields/Files.php b/src/app/Magic/Fields/Files.php index 002e584..6f32e00 100644 --- a/src/app/Magic/Fields/Files.php +++ b/src/app/Magic/Fields/Files.php @@ -24,7 +24,7 @@ class Files extends Field 'collection' => $collection, 'thumb_collection' => $this->_thumbCollection, 'default' => $collection, - 'options' => ['thumbnailHeight' => 368, 'thumbnailWidth' => 232, 'maxFilesize' => 1024, 'addRemoveLinks' => true, 'createImageThumbnails' => true, 'maxFiles' => $this->_maxFiles]]); + 'options' => ['thumbnailHeight' => 120, 'thumbnailWidth' => 120, 'maxFilesize' => 1024, 'addRemoveLinks' => true, 'createImageThumbnails' => true, 'maxFiles' => $this->_maxFiles]]); } protected function _getAttributesAliases() diff --git a/src/resources/views/fields/dropzone_media.blade.php b/src/resources/views/fields/dropzone_media.blade.php index 75924a7..0d57047 100644 --- a/src/resources/views/fields/dropzone_media.blade.php +++ b/src/resources/views/fields/dropzone_media.blade.php @@ -2,58 +2,6 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? []; ?> -@section('previewTemplate') -
-
- -
-
-
- -
-
- -
-
-
- -
-
- -
-
- - Check - - - - - -
-
- - Error - - - - - - - -
-
-@endsection - - -
{{ $field['label'] }}
@@ -70,11 +18,95 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? {{-- Extra CSS and JS for this particular field --}} {{-- If a field type is shown multiple times on a form, the CSS and JS will only be loaded once --}} @if ($crud->checkIfFieldIsFirstOfItsType($field)) + + + + {{-- FIELD CSS - will be loaded in the after_styles section --}} @push('crud_fields_styles') + @endpush {{-- FIELD JS - will be loaded in the after_scripts section --}} @@ -129,7 +161,7 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? var collection = $(el).prev().val(); var dOptions = { url: base_url, - previewTemplate: '{!! str_replace(array("\r\n", "\r", "\n"), "", addslashes(View::getSection("previewTemplate"))); !!}', + previewTemplate: $("#dz-template-container").html(), init: function () { var files = f_{{$filesrand}}[collection]; if (files === undefined) {