|
@@ -1,3 +1,4 @@
|
|
|
|
+window.top.currentMcUrl = '';
|
|
window.top.addEventListener('popstate', function (event) {
|
|
window.top.addEventListener('popstate', function (event) {
|
|
window.setTimeout(function () {
|
|
window.setTimeout(function () {
|
|
hideMask();
|
|
hideMask();
|
|
@@ -162,7 +163,10 @@ function onFastLoaded(_data, _href, _history) {
|
|
initPrimaryForm();
|
|
initPrimaryForm();
|
|
initPatientPresenceIndicator();
|
|
initPatientPresenceIndicator();
|
|
runMCInitializers();
|
|
runMCInitializers();
|
|
- $(window).scrollTop(0);
|
|
|
|
|
|
+ if(window.top.currentMcUrl !== window.top.location.href) {
|
|
|
|
+ $(window).scrollTop(0);
|
|
|
|
+ }
|
|
|
|
+ window.top.currentMcUrl = window.top.location.href;
|
|
}, 50);
|
|
}, 50);
|
|
// if(typeof initializeCalendar !== 'undefined') {
|
|
// if(typeof initializeCalendar !== 'undefined') {
|
|
// initializeCalendar();
|
|
// initializeCalendar();
|
|
@@ -183,8 +187,6 @@ function fastLoad(_href, _history = true, _useCache = true, _replaceState = fals
|
|
|
|
|
|
let domPro = $(window.top.document.body).attr('data-pro-uid'),
|
|
let domPro = $(window.top.document.body).attr('data-pro-uid'),
|
|
lsPro = window.top.localStorage.currentProUid;
|
|
lsPro = window.top.localStorage.currentProUid;
|
|
- console.log('ALIX DOM: ', domPro);
|
|
|
|
- console.log('ALIX LS: ', lsPro);
|
|
|
|
if(lsPro && domPro && lsPro !== domPro) {
|
|
if(lsPro && domPro && lsPro !== domPro) {
|
|
console.warn('ALIX Looks like you have a session as another pro on another tab. Refreshing window.top...');
|
|
console.warn('ALIX Looks like you have a session as another pro on another tab. Refreshing window.top...');
|
|
window.top.location.href = _href;
|
|
window.top.location.href = _href;
|