From 33dc094361ab626deb63972814cf2c3e403a694f Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Fri, 5 Dec 2014 13:04:00 +0000 Subject: [PATCH] added loading message when user broadcasts a transaction --- js/coinbin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/coinbin.js b/js/coinbin.js index cf02ac1..372c53d 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -481,7 +481,9 @@ $(document).ready(function() { /* broadcast a transaction */ $("#rawSubmitBtn").click(function(){ + var thisbtn = this; var tx = coinjs.transaction(); + $(thisbtn).val('Please wait, loading...').attr('disabled',true); tx.broadcast(function(data){ $("#rawTransactionStatus").html(unescape($(data).find("response").text()).replace(/\+/g,' ')).removeClass('hidden'); if($(data).find("result").text()==1){ @@ -491,6 +493,7 @@ $(document).ready(function() { $("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').prepend(' '); } $("#rawTransactionStatus").fadeOut().fadeIn(); + $(thisbtn).val('Submit').attr('disabled',false); }, $("#rawTransaction").val()); });