added loading message when user broadcasts a transaction
This commit is contained in:
parent
245f1e4508
commit
33dc094361
1 changed files with 3 additions and 0 deletions
|
@ -481,7 +481,9 @@ $(document).ready(function() {
|
||||||
/* broadcast a transaction */
|
/* broadcast a transaction */
|
||||||
|
|
||||||
$("#rawSubmitBtn").click(function(){
|
$("#rawSubmitBtn").click(function(){
|
||||||
|
var thisbtn = this;
|
||||||
var tx = coinjs.transaction();
|
var tx = coinjs.transaction();
|
||||||
|
$(thisbtn).val('Please wait, loading...').attr('disabled',true);
|
||||||
tx.broadcast(function(data){
|
tx.broadcast(function(data){
|
||||||
$("#rawTransactionStatus").html(unescape($(data).find("response").text()).replace(/\+/g,' ')).removeClass('hidden');
|
$("#rawTransactionStatus").html(unescape($(data).find("response").text()).replace(/\+/g,' ')).removeClass('hidden');
|
||||||
if($(data).find("result").text()==1){
|
if($(data).find("result").text()==1){
|
||||||
|
@ -491,6 +493,7 @@ $(document).ready(function() {
|
||||||
$("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').prepend('<span class="glyphicon glyphicon-exclamation-sign"></span> ');
|
$("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').prepend('<span class="glyphicon glyphicon-exclamation-sign"></span> ');
|
||||||
}
|
}
|
||||||
$("#rawTransactionStatus").fadeOut().fadeIn();
|
$("#rawTransactionStatus").fadeOut().fadeIn();
|
||||||
|
$(thisbtn).val('Submit').attr('disabled',false);
|
||||||
}, $("#rawTransaction").val());
|
}, $("#rawTransaction").val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue