diff options
| -rw-r--r-- | share/frontend/imconcat/index.html | 14 |
1 files changed, 10 insertions, 4 deletions
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() }) }) |
