From 5170f2b7f3ee46cb95f332c6e7a6401d42f7f922 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 7 Oct 2014 16:33:51 +0000 Subject: improved error handling diff --git a/js/shows.js b/js/shows.js index a0022b6..dc03156 100644 --- a/js/shows.js +++ b/js/shows.js @@ -24,23 +24,20 @@ function shows_importAddCart(cart, dz, file) { } function shows_importCartCancel(cart, dz) { - var cart_row = $('#show-cart-' + cart) - cart_row.next().remove(); - cart_row.find('.btn').removeAttr('disabled'); - cart_row.after(shows_getDzStat(true)); + shows_deleteCart(cart); dz.off("error"); dz.disable(); } function shows_importFileUploadError(cart, dz, file, msg, xhr) { - alert("import file upload error: " + msg); + alertbox.error('app-shows', "Import Fehler", $('
').append($('
').text(msg)).html());
+  shows_deleteCart(cart);  
   dz.disable();
-  shows_updateGroupCartInfo(cart);
 }
 
 function shows_importFileUploadSuccess(cart, dz, file) {
-  dz.disable();
   shows_updateGroupCartInfo(cart);
+  dz.disable();
 }
 
 function shows_importUpdateProgress(file, stats)
-- 
cgit v0.10.2