Skip to content

Commit

Permalink
feat: Open Intsnace Editor right after creating it - MEED-6947 - Meed…
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Jun 4, 2024
1 parent b33d69c commit 4811bc3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ export default {
this.$root.$on('portlet-instance-delete', this.deletePortletInstanceConfirm);
this.$root.$on('portlet-instance-category-selected', this.selectCategoryId);
this.$root.$on('portlet-instance-layout-updated', this.handleLayoutUpdated);
this.$root.$on('portlet-instance-created', this.handleInstanceCreated);
},
beforeDestroy() {
this.$root.$off('portlet-instance-delete', this.deletePortletInstanceConfirm);
this.$root.$off('portlet-instance-category-selected', this.selectCategoryId);
this.$root.$off('portlet-instance-layout-updated', this.handleLayoutUpdated);
this.$root.$off('portlet-instance-created', this.handleInstanceCreated);
},
methods: {
applySortOnItems(portletInstances, sortFields, sortDescendings) {
Expand Down Expand Up @@ -222,6 +224,10 @@ export default {
this.$root.$emit('portlet-instance-saved', instance);
this.$root.$emit('alert-message', this.$t('layout.portletInstanceLayoutUpdatedSuccessfully'), 'success');
},
handleInstanceCreated(instance) {
const instanceEditorLink = `/portal/${eXo.env.portal.portalName}/portlet-editor?id=${instance.id}`;
window.open(instanceEditorLink, '_blank');
},
},
};
</script>

0 comments on commit 4811bc3

Please sign in to comment.