forked from 0x2620/pandora
delay timeout error to avoid it on page unload
This commit is contained in:
parent
89296dd356
commit
07d99ee056
1 changed files with 37 additions and 34 deletions
|
@ -48,7 +48,8 @@ pandora.ui.errorDialog = function(data) {
|
||||||
|
|
||||||
// on window unload, pending request will time out, so
|
// on window unload, pending request will time out, so
|
||||||
// in order to keep the dialog from appearing, delay it
|
// in order to keep the dialog from appearing, delay it
|
||||||
|
setTimeout(function() {
|
||||||
|
if ($('.OxErrorDialog').length ==0 && !pandora.isUnloading) {
|
||||||
that = Ox.Dialog({
|
that = Ox.Dialog({
|
||||||
buttons: [
|
buttons: [
|
||||||
Ox.Button({
|
Ox.Button({
|
||||||
|
@ -84,5 +85,7 @@ pandora.ui.errorDialog = function(data) {
|
||||||
})
|
})
|
||||||
.open();
|
.open();
|
||||||
}
|
}
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
that.addClass('OxErrorDialog');
|
that.addClass('OxErrorDialog');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue