summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-02-22 19:36:50 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-02-22 19:36:50 (GMT)
commit71b2740e35ca72b547ec70bd44579b6fc98ce3f5 (patch)
tree35a2f0d1a6fb7efd48df1ce193c961afc2ed9e5b /www
parent64b27a0914f7d6f3f6c60001c3a66fd7d432421e (diff)
disable alerts, add onbeforeunload event
Diffstat (limited to 'www')
-rw-r--r--www/js/apps.js12
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() {