From b3cb1f49b54f5ce9a36456d3c767d4a97da8b39c Mon Sep 17 00:00:00 2001 From: Pepper Date: Thu, 10 Mar 2016 14:59:29 -0500 Subject: added better error reporting --- share/frontend/imconcat/index.html | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'share/frontend') diff --git a/share/frontend/imconcat/index.html b/share/frontend/imconcat/index.html index bdc676b..c851100 100644 --- a/share/frontend/imconcat/index.html +++ b/share/frontend/imconcat/index.html @@ -3,7 +3,6 @@ Photoblaster Concatenate - @@ -87,6 +86,9 @@ background-position: 3px 10px; cursor: pointer; } + .modal-footer{ + border: none; + } @@ -211,7 +213,6 @@ } }); function showSuccess(data){ - console.log("in show success function") $('.success').removeClass('dontshowme') $('#final_image').find('img').attr("src", data.url) $('#final_image').find('a').attr("href", data.url) @@ -236,7 +237,14 @@ case 500: msg = "Problem with the request. Please check your input parameters." break; - default: + case 400: + msg = data.responseJSON.message + reportError("hello") + break; + case 410: + msg = data.responseJSON.message + break; + default: msg = "Request was unable to reach the server. Try Again?" } reportError(msg) @@ -252,10 +260,9 @@ $('#logos').find('img').attr("src", "img/logo-complete.png") }; function reportError(msg){ - $('h4.failure').toggleClass("dontshowme") + $('.failure, #error_message').removeClass("dontshowme") $('#error_message').html(msg) - $('#error_message').toggleClass("dontshowme") - generatingOff() + $('#error_message').removeClass("dontshowme") $('.modal').modal(); } function resetModal(){ -- cgit v1.2.3-70-g09d2