[icinga-checkins] icinga.org: icinga-web/master: * Added auto-cancel to requests when beforeunload is called

git at icinga.org git at icinga.org
Wed Feb 22 13:47:24 CET 2012


Module: icinga-web
Branch: master
Commit: aafc0fde9c5fc0358433ba7328a7f5d32bc0af2d
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=aafc0fde9c5fc0358433ba7328a7f5d32bc0af2d

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Wed Feb 22 13:46:43 2012 +0100

* Added auto-cancel to requests when beforeunload is called

---

 app/modules/AppKit/lib/js/request/Ajax.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/app/modules/AppKit/lib/js/request/Ajax.js b/app/modules/AppKit/lib/js/request/Ajax.js
index 62c53cb..8d4b7ad 100644
--- a/app/modules/AppKit/lib/js/request/Ajax.js
+++ b/app/modules/AppKit/lib/js/request/Ajax.js
@@ -10,6 +10,9 @@ Ext.Ajax.request = function(o) {
             Ext.data.Connection.prototype.abort.call(this,req);
         });
     }
+    Ext.EventManager.on(window,"beforeunload",function() {
+        Ext.data.Connection.prototype.abort.call(this,req);
+    });
     return req;
 };
 





More information about the icinga-checkins mailing list