|
@@ -87,9 +87,16 @@ function openDynamicStagPopup(url, initer, title, updateParent) {
|
|
}
|
|
}
|
|
showStagPopup(url);
|
|
showStagPopup(url);
|
|
if(initer) runMCInitializer(initer);
|
|
if(initer) runMCInitializer(initer);
|
|
|
|
+ runMCInitializer('pro-suggest');
|
|
hideMask();
|
|
hideMask();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+function isDynamicStagPopupPresent() {
|
|
|
|
+ if(!stagPopupsQueue.length) return false;
|
|
|
|
+ let popup = stagPopupsQueue[stagPopupsQueue.length - 1];
|
|
|
|
+ if(popup.is('.dynamic-popup')) return true;
|
|
|
|
+ return false;
|
|
|
|
+}
|
|
function refreshDynamicStagPopup() {
|
|
function refreshDynamicStagPopup() {
|
|
if(!stagPopupsQueue.length) return;
|
|
if(!stagPopupsQueue.length) return;
|
|
let popup = stagPopupsQueue[stagPopupsQueue.length - 1];
|
|
let popup = stagPopupsQueue[stagPopupsQueue.length - 1];
|
|
@@ -99,7 +106,9 @@ function refreshDynamicStagPopup() {
|
|
let url = popup.attr('stag-popup-key'),
|
|
let url = popup.attr('stag-popup-key'),
|
|
initer = popup.attr('mc-initer');
|
|
initer = popup.attr('mc-initer');
|
|
$.get(url, (_data) => {
|
|
$.get(url, (_data) => {
|
|
|
|
+ popup.find('.stag-popup-content-inner').html(_data);
|
|
if(initer) runMCInitializer(initer);
|
|
if(initer) runMCInitializer(initer);
|
|
|
|
+ runMCInitializer('pro-suggest');
|
|
hideMask();
|
|
hideMask();
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -119,9 +128,11 @@ function refreshDynamicStagPopup() {
|
|
.off('keydown.stag-popup-escape')
|
|
.off('keydown.stag-popup-escape')
|
|
.on('keydown.stag-popup-escape', function (e) {
|
|
.on('keydown.stag-popup-escape', function (e) {
|
|
if(e.which === 27) {
|
|
if(e.which === 27) {
|
|
- if(stagPopupsQueue.length) {
|
|
|
|
- closeStagPopup();
|
|
|
|
- return false;
|
|
|
|
|
|
+ if(!window.moeClosedAt || (new Date()).getTime() - window.moeClosedAt > 1000) {
|
|
|
|
+ if(stagPopupsQueue.length) {
|
|
|
|
+ closeStagPopup();
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|