Skip to content

NOW MANAGED ON CODEBERG

dropzone: Addressed existing todos, cleaned attachment ux

Dan Brown9a17656f88cc
diff --git a/app/Http/Controllers/Images/GalleryImageController.php b/app/Http/Controllers/Images/GalleryImageController.php
index 99226e5e9..c01eccfee 100644
--- a/app/Http/Controllers/Images/GalleryImageController.php
+++ b/app/Http/Controllers/Images/GalleryImageController.php
@@ -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']));
}
diff --git a/resources/js/components/editor-toolbox.js b/resources/js/components/editor-toolbox.js
index 1f1fce9dc..4d3c0ae75 100644
--- a/resources/js/components/editor-toolbox.js
+++ b/resources/js/components/editor-toolbox.js
@@ -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() {
diff --git a/resources/views/attachments/manager-edit-form.blade.php b/resources/views/attachments/manager-edit-form.blade.php
index 9422a0752..cfb514df0 100644
--- a/resources/views/attachments/manager-edit-form.blade.php
+++ b/resources/views/attachments/manager-edit-form.blade.php
@@ -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>
diff --git a/resources/views/attachments/manager-link-form.blade.php b/resources/views/attachments/manager-link-form.blade.php
index e9ec2d6dc..a2fba83eb 100644
--- a/resources/views/attachments/manager-link-form.blade.php
+++ b/resources/views/attachments/manager-link-form.blade.php
@@ -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>
diff --git a/resources/views/attachments/manager.blade.php b/resources/views/attachments/manager.blade.php
index 4eeee24bb..4526172d4 100644
--- a/resources/views/attachments/manager.blade.php
+++ b/resources/views/attachments/manager.blade.php
@@ -38,12 +38,12 @@
</div>
</div>
+ </div>
- <div refs="attachments@links-container" hidden class="link-form-container">
- @include('attachments.manager-link-form', ['pageId' => $page->id])
- </div>
+ <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>
\ No newline at end of file
diff --git a/resources/views/form/simple-dropzone.blade.php b/resources/views/form/simple-dropzone.blade.php
index e274949ea..cfd3d905d 100644
--- a/resources/views/form/simple-dropzone.blade.php
+++ b/resources/views/form/simple-dropzone.blade.php
@@ -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">