|
@@ -29,8 +29,14 @@ function submitStagPopup(_form) {
|
|
|
function closeStagPopup() {
|
|
|
if(!stagPopupsQueue.length) return false;
|
|
|
let popup = stagPopupsQueue[stagPopupsQueue.length - 1];
|
|
|
+ let closeAll = !!popup.attr('close-all-with-self');
|
|
|
popup.removeClass('show');
|
|
|
stagPopupsQueue.splice(stagPopupsQueue.length - 1, 1);
|
|
|
+ if(closeAll) {
|
|
|
+ while(stagPopupsQueue.length) {
|
|
|
+ closeStagPopup();
|
|
|
+ }
|
|
|
+ }
|
|
|
// if all closed
|
|
|
if(!stagPopupsQueue.length) {
|
|
|
$('html, body').removeClass('no-scroll');
|