diff --git a/src/admin/components/edition/term-edition-form.vue b/src/admin/components/edition/term-edition-form.vue index 6bdcc4b89..73e8c09a6 100644 --- a/src/admin/components/edition/term-edition-form.vue +++ b/src/admin/components/edition/term-edition-form.vue @@ -35,7 +35,7 @@ class="button is-rounded is-secondary" id="button-delete-header" :aria-label="$i18n.get('label_button_delete_thumb')" - @click="deleteThumbnail()"> + @click="deleteHeaderImage()"> @@ -131,7 +131,7 @@ methods: { ...mapActions('taxonomy', [ 'sendTerm', - 'updateTerm', + 'updateChildTerm', ]), ...mapGetters('taxonomy', [ 'getTerms' @@ -149,7 +149,7 @@ .then(() => { this.editForm = {}; this.formErrors = {}; - this.$termsListBus.onTermEditionSaved(this.editForm); + this.$emit('onEditionFinished'); }) .catch((errors) => { for (let error of errors.errors) { @@ -161,7 +161,7 @@ }); } else { - this.updateTerm({ + this.updateChildTerm({ taxonomyId: this.taxonomyId, termId: this.editForm.id, name: this.editForm.name, @@ -172,7 +172,7 @@ .then(() => { this.editForm.saved = true; this.formErrors = {}; - this.$termsListBus.onTermEditionSaved(this.editForm); + this.$emit('onEditionFinished', this.editForm); }) .catch((errors) => { for (let error of errors.errors) { @@ -185,7 +185,7 @@ } }, cancelEdition() { - this.$termsListBus.onTermEditionCanceled(this.editForm); + this.$emit('onEditionCanceled', this.editForm); }, deleteHeaderImage() { this.editForm = Object.assign({}, @@ -197,7 +197,6 @@ ); }, initializeMediaFrames() { - this.headerImageMediaFrame = new wpMediaFrames.headerImageControl( 'my-header-image-media-frame', { button_labels: { @@ -226,7 +225,7 @@ } }, }, - created() { + mounted() { this.initializeMediaFrames(); } } diff --git a/src/admin/components/lists/recursive-terms-list.vue b/src/admin/components/lists/recursive-terms-list.vue index b5d863334..846aca36f 100644 --- a/src/admin/components/lists/recursive-terms-list.vue +++ b/src/admin/components/lists/recursive-terms-list.vue @@ -1,5 +1,5 @@ - + - {{ term.saved && !term.opened ? term.name : getUnsavedTermName(term) }} + {{ term.name }} {{ term.total_children + ' ' + $i18n.get('label_children_terms') }} - - + + - - + @@ -80,6 +79,7 @@