delay timeout error to avoid it on page unload

This commit is contained in:
j 2012-01-21 01:06:11 +05:30
parent 89296dd356
commit 07d99ee056

View file

@ -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');
}; };