Skip to content

Commit

Permalink
fix: Fix SNV Editor Back Url - MEED-6937 - Meeds-io/meeds#2060
Browse files Browse the repository at this point in the history
Prior to this change, when editing SNV in full edit mode (with a new page opened in a new tab) and then the user publishes the SNV content, the SNV redirects to the previous page which is the Layout Editor. When the layout editor is opened again in a new Tab, a new draft page is opened and makes the first Tab with Layout editor in an invalid state. This change will avoid redirection to layout editor when publishing the SNV by introducing a global variable indicating the page being edited in editor and that should be used for redirection in SNV.
  • Loading branch information
boubaker committed May 28, 2024
1 parent 88fd92a commit 5d5eecc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions layout-webapp/src/main/webapp/vue-app/layout-editor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export function init() {
diffScrollX: 0,
diffScrollY: 0,
gap: 20,
nodeUri: null,
}),
computed: {
parentAppX() {
Expand Down Expand Up @@ -129,6 +130,11 @@ export function init() {
this.$root.$emit('layout-editor-moving-end', this.movingParentId);
}
},
nodeUri() {
if (this.nodeUri) {
eXo.env.portal.webPageUrl = `/portal${this.nodeUri}`;
}
},
layout(newVal, oldVal) {
if (!oldVal) {
window.setTimeout(() => document.dispatchEvent(new CustomEvent('hideTopBarLoading')), 200);
Expand Down

0 comments on commit 5d5eecc

Please sign in to comment.