Fix cornerPopup timeout not always applied
This commit is contained in:
parent
d0bce11c21
commit
2cceb54aac
@ -1148,7 +1148,14 @@ define([
|
|||||||
var deletePopup = function () {
|
var deletePopup = function () {
|
||||||
$popup.remove();
|
$popup.remove();
|
||||||
if (!corner.queue.length) {
|
if (!corner.queue.length) {
|
||||||
|
// Make sure no other popup is displayed in the next 5s
|
||||||
|
setTimeout(function () {
|
||||||
|
if (corner.queue.length) {
|
||||||
|
$('body').append(corner.queue.pop());
|
||||||
|
return;
|
||||||
|
}
|
||||||
corner.state = false;
|
corner.state = false;
|
||||||
|
}, 5000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|||||||
@ -4306,6 +4306,9 @@ define([
|
|||||||
var initialHide = data && data.autoStore && data.autoStore === -1;
|
var initialHide = data && data.autoStore && data.autoStore === -1;
|
||||||
var modal = UI.cornerPopup(text, actions, footer, {hidden: initialHide});
|
var modal = UI.cornerPopup(text, actions, footer, {hidden: initialHide});
|
||||||
|
|
||||||
|
// Once the store pad popup is created, put the crowdfunding one in the queue
|
||||||
|
UIElements.displayCrowdfunding(common);
|
||||||
|
|
||||||
autoStoreModal[priv.channel] = modal;
|
autoStoreModal[priv.channel] = modal;
|
||||||
|
|
||||||
$(modal.popup).find('.cp-corner-footer a').click(function (e) {
|
$(modal.popup).find('.cp-corner-footer a').click(function (e) {
|
||||||
@ -4314,7 +4317,6 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(hide).click(function () {
|
$(hide).click(function () {
|
||||||
UIElements.displayCrowdfunding(common);
|
|
||||||
delete autoStoreModal[priv.channel];
|
delete autoStoreModal[priv.channel];
|
||||||
modal.delete();
|
modal.delete();
|
||||||
});
|
});
|
||||||
@ -4334,7 +4336,6 @@ define([
|
|||||||
$(document).trigger('cpPadStored');
|
$(document).trigger('cpPadStored');
|
||||||
delete autoStoreModal[priv.channel];
|
delete autoStoreModal[priv.channel];
|
||||||
modal.delete();
|
modal.delete();
|
||||||
UIElements.displayCrowdfunding(common);
|
|
||||||
UI.log(Messages.autostore_saved);
|
UI.log(Messages.autostore_saved);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user