From 26eafcfae15c575836ae5311eac18dfd567fce78 Mon Sep 17 00:00:00 2001 From: pepperpepperpepper Date: Wed, 9 Mar 2016 19:52:56 -0800 Subject: concat --- share/frontend/imconcat/index.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/frontend/imconcat/index.html b/share/frontend/imconcat/index.html index b7b7c72..49b3909 100644 --- a/share/frontend/imconcat/index.html +++ b/share/frontend/imconcat/index.html @@ -183,6 +183,7 @@ } ], "onSubmitValid": function (values) { + generatingOn() $.ajax({ url: '/im/api/pbconcat', type: 'post', @@ -207,7 +208,7 @@ $('#final_size > .final_value').html(data.size.toString() + " bytes") $('#final_url > .final_value').val(data.url) $('#final_width, #final_height, #final_size, #final_url, #final_image').removeClass('dontshowme') - $('.modal').modal(); + $('.modal').modal() } function showFailure(data){ var msg; @@ -221,12 +222,17 @@ default: msg = "Request was unable to reach the server. Try Again?" } - console.log(msg) reportError(msg) } function generatingOn(){ + resetModal() + $('form').find('input[type=submit]').prop('disabled', true); + $('#logos').find('img').attr("src", "img/generating.gif") }; function generatingOff(){ + resetModal() + $('form').find('input[type=submit]').prop('disabled', false); + $('#logos').find('img').attr("src", "img/logo-complete.gif") }; function reportError(msg){ $('h4.failure').toggleClass("dontshowme") @@ -245,10 +251,10 @@ ) } $('.modal-content').find("button").click(function(){ - resetModal() + generatingOff() }) $('#myModal').on('hidden.bs.modal', function () { - resetModal() + generatingOff() }) }) -- cgit v1.2.3-70-g09d2