dropzone: Addressed existing todos, cleaned attachment ux
Updated dom layout of attahcments to prevent nested dropzones (No issue but potential to be one) and updated edit form dropzone handling so the dropzone item card was not as distracting.
This commit is contained in:
parent
e36cdaad0d
commit
9a17656f88
|
@ -48,7 +48,6 @@ class GalleryImageController extends Controller
|
|||
'file' => $this->getImageValidationRules(),
|
||||
]);
|
||||
} catch (ValidationException $exception) {
|
||||
// TODO - Check potential other upload locations?
|
||||
return $this->jsonError(implode("\n", $exception->errors()['file']));
|
||||
}
|
||||
|
||||
|
|
|
@ -13,10 +13,6 @@ export class EditorToolbox extends Component {
|
|||
|
||||
// Set the first tab as active on load
|
||||
this.setActiveTab(this.contentElements[0].dataset.tabContent);
|
||||
|
||||
setTimeout(() => {
|
||||
this.setActiveTab('files', true);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
setupListeners() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div component="ajax-form"
|
||||
option:ajax-form:url="/attachments/{{ $attachment->id }}"
|
||||
option:ajax-form:method="put"
|
||||
option:ajax-form:response-container=".attachment-edit-container"
|
||||
option:ajax-form:response-container="#edit-form-container"
|
||||
option:ajax-form:success-message="{{ trans('entities.attachments_updated_success') }}">
|
||||
<h5>{{ trans('entities.attachments_edit_file') }}</h5>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div component="ajax-form"
|
||||
option:ajax-form:url="/attachments/link"
|
||||
option:ajax-form:method="post"
|
||||
option:ajax-form:response-container=".link-form-container"
|
||||
option:ajax-form:response-container="#link-form-container"
|
||||
option:ajax-form:success-message="{{ trans('entities.attachments_link_attached') }}">
|
||||
<input type="hidden" name="attachment_link_uploaded_to" value="{{ $pageId }}">
|
||||
<p class="text-muted small">{{ trans('entities.attachments_explain_link') }}</p>
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div refs="attachments@links-container" hidden class="link-form-container">
|
||||
<div id="link-form-container" refs="attachments@links-container" hidden class="px-l">
|
||||
@include('attachments.manager-link-form', ['pageId' => $page->id])
|
||||
</div>
|
||||
|
||||
<div refs="attachments@edit-container" hidden class="attachment-edit-container"></div>
|
||||
<div id="edit-form-container" refs="attachments@edit-container" hidden class="px-l"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -12,7 +12,7 @@
|
|||
option:dropzone:zone-text="{{ trans('entities.attachments_dropzone') }}"
|
||||
option:dropzone:file-accept="*"
|
||||
class="relative">
|
||||
<div refs="dropzone@status-area" class="fixed top-right px-m py-m"></div>
|
||||
<div refs="dropzone@status-area"></div>
|
||||
<button type="button"
|
||||
refs="dropzone@select-button dropzone@drop-target"
|
||||
class="dropzone-landing-area text-center">
|
||||
|
|
Loading…
Reference in New Issue