diff --git a/src/views/admin/components/edition/item-edition-form.vue b/src/views/admin/components/edition/item-edition-form.vue index aa42fc978..c5329bc22 100644 --- a/src/views/admin/components/edition/item-edition-form.vue +++ b/src/views/admin/components/edition/item-edition-form.vue @@ -1213,7 +1213,7 @@ export default { // Sends info to iframe containing item edition form and other use cases parent.postMessage({ type: 'itemEditionMessage', - item: this.$adminOptions.itemEditionMode ? this.item : null + item: this.$adminOptions.itemEditionMode ? JSON.parse(JSON.stringify(this.item)) : null }, tainacan_plugin.admin_url); @@ -1224,7 +1224,7 @@ export default { webkit.messageHandlers && webkit.messageHandlers.cordova_iab ) - webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'item_updated', 'item': this.item })); + webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'item_updated', 'item': JSON.parse(JSON.stringify(this.item)) })); }) .catch((errors) => { @@ -1868,7 +1868,7 @@ export default { webkit.messageHandlers && webkit.messageHandlers.cordova_iab ) - webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'exited_from_navigation', 'item': this.item })); + webkit.messageHandlers.cordova_iab.postMessage(JSON.stringify({ 'type': 'exited_from_navigation', 'item': JSON.parse(JSON.stringify(this.item)) })); }, isSectionHidden(sectionId) { return this.conditionalSections[sectionId] && this.conditionalSections[sectionId].hide; diff --git a/src/views/admin/components/metadata-types/relationship/TainacanRelationship.vue b/src/views/admin/components/metadata-types/relationship/TainacanRelationship.vue index 520d25389..c3d1da6c8 100644 --- a/src/views/admin/components/metadata-types/relationship/TainacanRelationship.vue +++ b/src/views/admin/components/metadata-types/relationship/TainacanRelationship.vue @@ -448,8 +448,11 @@ valuesAsHtml: this.getItemMetadataValuesAsHtml(data.item), img: data.item.thumbnail ? data.item.thumbnail : '' }); - + this.onInput(this.selected); + + if ( this.itemMetadatum.metadatum.multiple != 'yes' ) + this.activeTab = 1; } } }