Commit 05104d5a authored by Alain Takoudjou's avatar Alain Takoudjou

[erp5_officejs] make monitoring app still compatible with older instances monitor-setup URL

parent dd87a961
...@@ -88,13 +88,21 @@ var repair = false; ...@@ -88,13 +88,21 @@ var repair = false;
} }
state.redirect_url = new URL(window.location); state.redirect_url = new URL(window.location);
state.redirect_url.pathname += state.version_url; state.redirect_url.pathname += state.version_url;
// This is a bad hack to support dropbox. if (state.redirect_url.hash) {
if (state.redirect_url.hash && if (state.redirect_url.hash.startsWith('#access_token')) {
state.redirect_url.hash.startsWith('#access_token')) { // This is a bad hack to support dropbox.
state.redirect_url.hash = state.redirect_url.hash.replace( state.redirect_url.hash = state.redirect_url.hash.replace(
'#access_token', '#access_token',
'#/?page=ojs_dropbox_configurator&access_token' '#/?page=ojs_dropbox_configurator&access_token'
); );
} else if (state.redirect_url.hash
.startsWith('#page=settings_configurator')) {
// Make monitoring app still compatible with old instances setup URLs
state.redirect_url.hash = state.redirect_url.hash.replace(
'#page=settings_configurator',
'#/?page=settings_configurator'
);
}
} }
return gadget.changeState(state); return gadget.changeState(state);
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment