diff --git a/compile-sass.sh b/compile-sass.sh index 78382b9c9..92369e83c 100644 --- a/compile-sass.sh +++ b/compile-sass.sh @@ -21,11 +21,15 @@ sass -E 'UTF-8' --cache-location .tmp/sass-cache-5 src/gutenberg-blocks/tainacan sass -E 'UTF-8' --cache-location .tmp/sass-cache-6 src/gutenberg-blocks/tainacan-items/dynamic-items-list/dynamic-items-list.scss:src/assets/css/tainacan-gutenberg-block-dynamic-items-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-7 src/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-7 src/gutenberg-blocks/tainacan-items/search-bar/search-bar.scss:src/assets/css/tainacan-gutenberg-block-search-bar.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-8 src/gutenberg-blocks/tainacan-terms/terms-list/terms-list.scss:src/assets/css/tainacan-gutenberg-block-terms-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-8 src/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css -sass -E 'UTF-8' --cache-location .tmp/sass-cache-9 src/gutenberg-blocks/tainacan-facets/facets-list/facets-list.scss:src/assets/css/tainacan-gutenberg-block-facets-list.css +sass -E 'UTF-8' --cache-location .tmp/sass-cache-9 src/gutenberg-blocks/tainacan-items/carousel-items-list/carousel-items-list.scss:src/assets/css/tainacan-gutenberg-block-carousel-items-list.css + +sass -E 'UTF-8' --cache-location .tmp/sass-cache-10 src/gutenberg-blocks/tainacan-terms/terms-list/terms-list.scss:src/assets/css/tainacan-gutenberg-block-terms-list.css + +sass -E 'UTF-8' --cache-location .tmp/sass-cache-11 src/gutenberg-blocks/tainacan-facets/facets-list/facets-list.scss:src/assets/css/tainacan-gutenberg-block-facets-list.css echo "Compilação do Sass Concluído!" exit 0 diff --git a/src/admin/components/edition/item-edition-form.vue b/src/admin/components/edition/item-edition-form.vue index b93a2cf1e..d2d2a8fa0 100644 --- a/src/admin/components/edition/item-edition-form.vue +++ b/src/admin/components/edition/item-edition-form.vue @@ -509,14 +509,16 @@ style="margin-left: calc(4.666667% + 12px)" type="button" class="button is-secondary" - @click.prevent="attachmentMediaFrame.openFrame($event)"> + @click.prevent="attachmentMediaFrame.openFrame($event)" + :disabled="isLoadingAttachments"> {{ $i18n.get("label_edit_attachments") }} - @@ -753,6 +755,7 @@ export default { collectionAllowComments: '', entityName: 'item', activeTab: 0, + isLoadingAttachments: false } }, computed: { @@ -927,8 +930,12 @@ export default { this.form.document_type = this.item.document_type; this.form.comment_status = this.item.comment_status; + // Loads metadata and attachments this.loadMetadata(); - this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId }); + this.isLoadingAttachments = true; + this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId }) + .then(() => this.isLoadingAttachments = false) + .catch(() => this.isLoadingAttachments = false); }) .catch(error => this.$console.error(error)); @@ -1030,7 +1037,10 @@ export default { document_type: this.form.document_type }) .then(() => { - this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId, documentId: this.item.document }); + this.isLoadingAttachments = true; + this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId, documentId: this.item.document }) + .then(() => this.isLoadingAttachments = false) + .catch(() => this.isLoadingAttachments = false); }) .catch((errors) => { for (let error of errors.errors) { @@ -1061,7 +1071,10 @@ export default { onConfirm: () => { this.removeAttachmentFromItem(attachment.id) .then(() => { - this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId, documentId: this.item.document }); + this.isLoadingAttachments = true; + this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId, documentId: this.item.document }) + .then(() => this.isLoadingAttachments = false) + .catch(() => this.isLoadingAttachments = false); }) .catch((error) => { this.$console.error(error); @@ -1132,7 +1145,10 @@ export default { relatedPostId: this.itemId, onSave: () => { // Fetch current existing attachments - this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId, documentId: this.item.document }); + this.isLoadingAttachments = true; + this.fetchAttachments({ page: 1, attachmentsPerPage: 24, itemId: this.itemId, documentId: this.item.document }) + .then(() => this.isLoadingAttachments = false) + .catch(() => this.isLoadingAttachments = false); } } ); @@ -1410,8 +1426,13 @@ export default { padding-left: 0; padding-right: $page-side-padding; - .columns .column { - padding: 1rem $page-side-padding 0 24px; + .columns { + flex-wrap: wrap; + justify-content: space-between; + + .column { + padding: 1rem 12px 0 12px; + } } .field { diff --git a/src/admin/components/edition/taxonomy-edition-form.vue b/src/admin/components/edition/taxonomy-edition-form.vue index 5653a36d9..f46ac7904 100644 --- a/src/admin/components/edition/taxonomy-edition-form.vue +++ b/src/admin/components/edition/taxonomy-edition-form.vue @@ -495,7 +495,7 @@ } } -