@@ -579,8 +579,28 @@ $(document).ready(function() {
579
579
} ) ;
580
580
581
581
$ ( ".txidClear" ) . click ( function ( ) {
582
- $ ( "#inputs .row:first input" ) . attr ( 'disabled' , false ) ;
583
- $ ( "#inputs .row:first input" ) . val ( "" ) ;
582
+ if ( $ ( "#inputs > div" ) . length == 1 )
583
+ {
584
+ $ ( "#inputs .row:first input" ) . attr ( 'disabled' , false ) ;
585
+ $ ( "#inputs .row:first input" ) . val ( "" ) ;
586
+ }
587
+ else
588
+ {
589
+ $ . each ( $ ( "#inputs .row" ) , function ( i , o ) {
590
+ if ( $ ( o ) . is ( ':last-child' ) )
591
+ {
592
+ o . remove ( ) ;
593
+ return true ;
594
+ }
595
+ var next = $ ( o ) . next ( ) ;
596
+ $ ( ".txId" , o ) . val ( $ ( ".txId" , next ) . val ( ) ) ;
597
+ $ ( ".txIdScript" , o ) . val ( $ ( ".txIdScript" , next ) . val ( ) ) ;
598
+ $ ( ".txIdN" , o ) . val ( $ ( ".txIdN" , next ) . val ( ) ) ;
599
+ $ ( ".txIdAmount" , o ) . val ( $ ( ".txIdAmount" , next ) . val ( ) ) ;
600
+ $ ( "input" , o ) . attr ( 'disabled' , $ ( "input" , next ) . prop ( 'disabled' ) ) ;
601
+ } ) ;
602
+ }
603
+
584
604
totalInputAmount ( ) ;
585
605
} ) ;
586
606
@@ -673,7 +693,8 @@ $(document).ready(function() {
673
693
}
674
694
675
695
if ( $ ( "#clearInputsOnLoad" ) . is ( ":checked" ) ) {
676
- $ ( "#inputs .txidRemove, #inputs .txidClear" ) . click ( ) ;
696
+ $ ( "#inputs .txidRemove" ) . click ( ) ;
697
+ $ ( "#inputs .txidClear" ) . click ( ) ;
677
698
}
678
699
679
700
$ ( "#redeemFromBtn" ) . html ( "Please wait, loading..." ) . attr ( 'disabled' , true ) ;
0 commit comments