|
@@ -207,6 +207,7 @@ function onFastLoaded(_data, _href, _history, _target = null) {
|
|
|
hideMask();
|
|
|
hideMoeFormMask();
|
|
|
}
|
|
|
+ appendRedirectUrl();
|
|
|
} else {
|
|
|
// fallback
|
|
|
let msg = 'Unable to open page: ';
|
|
@@ -228,10 +229,22 @@ function onFastLoaded(_data, _href, _history, _target = null) {
|
|
|
$('.stag-content').first().html('<p class="text-danger p-3 small"><b>' + _data + '</b> - ' + msg + '<b>' + _href + '</b></p>');
|
|
|
hideMask();
|
|
|
hideMoeFormMask();
|
|
|
+ appendRedirectUrl();
|
|
|
}
|
|
|
$('html, body').removeClass('no-scroll');
|
|
|
}
|
|
|
|
|
|
+function appendRedirectUrl(_url) {
|
|
|
+ let targetLocation = window.top.location.pathname + window.top.location.search;
|
|
|
+ if(targetLocation.indexOf('/mc') === 0) {
|
|
|
+ targetLocation = targetLocation.substr(3);
|
|
|
+ }
|
|
|
+ let form = $('.frm-back-to-admin');
|
|
|
+ if(form.length) {
|
|
|
+ form.attr('action', form.attr('data-action') + '?redir=' + targetLocation);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
var fastReload = function(_target = null) {
|
|
|
var targetLocation = window.top.location.pathname + window.top.location.search;
|
|
|
if(targetLocation.indexOf('/mc') === 0) {
|