diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-02-22 19:36:50 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-02-22 19:36:50 (GMT) |
commit | 71b2740e35ca72b547ec70bd44579b6fc98ce3f5 (patch) | |
tree | 35a2f0d1a6fb7efd48df1ce193c961afc2ed9e5b /www/js | |
parent | 64b27a0914f7d6f3f6c60001c3a66fd7d432421e (diff) |
disable alerts, add onbeforeunload event
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/apps.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/www/js/apps.js b/www/js/apps.js index 0e52f22..e25c7d1 100644 --- a/www/js/apps.js +++ b/www/js/apps.js @@ -130,11 +130,15 @@ function apps_init() { }); $(document).ajaxError(function(event, jqXHR, settings, thrownError) { - var data = jqXHR.responseText; - var errorString = $(data).find('ErrorString').text(); - var ResponseCode = $(data).find('ResponseCode').text(); - alert(ResponseCode + ': ' + errorString); + //todo: add errors }); + + window.onbeforeunload = function(e) { + if (importer && importer.isUploading()) { + return 'Achtung: Es laufen noch imports.'; + return; + } + }; } function apps_cleanup() { |