Merge pull request #2414 from brkcvn/master

Selected bugfix solved for Single File in Import Page
This commit is contained in:
Cüneyt Şentürk 2022-06-02 16:43:04 +03:00 committed by GitHub
commit 3fe6d7610b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 13 deletions

3
public/css/app.css vendored
View File

@ -6977,6 +6977,9 @@ input[type="date"]::-webkit-inner-spin-button,
.-mb-2{
margin-bottom: -0.5rem;
}
.-ml-3{
margin-left: -0.75rem;
}
.box-border{
-webkit-box-sizing: border-box;
box-sizing: border-box;

View File

@ -25,7 +25,7 @@
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="avatar">
<img class="avatar-img rounded" data-dz-thumbnail>
<img class="avatar-img h-full rounded object-cover" data-dz-thumbnail>
<span class="material-icons hidden" data-dz-thumbnail-image>crop_original</span>
<span class="material-icons-outlined display-3 hidden" data-dz-thumbnail-pdf>picture_as_pdf</span>
<span class="material-icons-outlined hidden" data-dz-thumbnail-word>content_paste</span>
@ -164,6 +164,8 @@ export default {
file.previewElement.querySelector("[data-dz-thumbnail-image]").classList.remove("hidden");
}
}
self.onMaxFilesReached(self);
}),
dropzone.on('removedfile', function (file) {
@ -217,11 +219,7 @@ export default {
}
});
if (self.preview == 'single' && self.attachments.length == 1) {
self.$nextTick(() => {
document.querySelector("#dropzone-" + self._uid).classList.add("dz-max-files-reached");
});
}
self.onMaxFilesReached(self);
}, 100);
}
}
@ -231,6 +229,14 @@ export default {
preview.innerHTML = '';
},
onMaxFilesReached(arg) {
if (arg.preview == 'single' || arg.attachments.length == 1) {
arg.$nextTick(() => {
document.querySelector("#dropzone-" + arg._uid).classList.add("dz-max-files-reached");
});
}
}
},
async mounted() {
@ -262,11 +268,7 @@ export default {
}
});
if (this.preview == 'single' && attachments.length == 1) {
this.$nextTick(() => {
document.querySelector("#dropzone-" + this._uid).classList.add("dz-max-files-reached");
});
}
this.onMaxFilesReached(this);
}
}, this);

View File

@ -54,7 +54,7 @@
</x-slot>
<x-slot name="body">
<x-form.group.select name="landing_page" label="{{ trans('auth.landing_page') }}" :options="$landing_pages" selected="dashboard" />
<x-form.group.select name="landing_page" label="{!! trans('auth.landing_page') !!}" :options="$landing_pages" selected="dashboard" />
<x-form.group.locale />
</x-slot>

View File

@ -60,7 +60,7 @@
</x-slot>
<x-slot name="body">
<x-form.group.select name="landing_page" label="{{ trans('auth.landing_page') }}" :options="$landing_pages" />
<x-form.group.select name="landing_page" label="{!! trans('auth.landing_page') !!}" :options="$landing_pages" />
<x-form.group.locale />
</x-slot>