Skip to content

Commit

Permalink
fixed an issue with incorrect first input removing on the tranasactio…
Browse files Browse the repository at this point in the history
…n tab
  • Loading branch information
schnibble committed Dec 14, 2016
1 parent 20547ff commit a096042
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions js/coinbin.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,28 @@ $(document).ready(function() {
});

$(".txidClear").click(function(){
$("#inputs .row:first input").attr('disabled',false);
$("#inputs .row:first input").val("");
if ($("#inputs > div").length == 1)
{
$("#inputs .row:first input").attr('disabled',false);
$("#inputs .row:first input").val("");
}
else
{
$.each($("#inputs .row"), function(i,o){
if ($(o).is(':last-child'))
{
o.remove();
return true;
}
var next = $(o).next();
$(".txId",o).val($(".txId",next).val());
$(".txIdScript",o).val($(".txIdScript",next).val());
$(".txIdN",o).val($(".txIdN",next).val());
$(".txIdAmount",o).val($(".txIdAmount",next).val());
$("input",o).attr('disabled',$("input",next).prop('disabled'));
});
}

totalInputAmount();
});

Expand Down Expand Up @@ -673,7 +693,8 @@ $(document).ready(function() {
}

if($("#clearInputsOnLoad").is(":checked")){
$("#inputs .txidRemove, #inputs .txidClear").click();
$("#inputs .txidRemove").click();
$("#inputs .txidClear").click();
}

$("#redeemFromBtn").html("Please wait, loading...").attr('disabled',true);
Expand Down

0 comments on commit a096042

Please sign in to comment.