@@ -94,6 +94,14 @@ Ethplorer = {
94
94
} ) ;
95
95
$ ( document ) . on ( 'click' , '[data-toggle="tab"]' , function ( ) {
96
96
Ethplorer . Nav . set ( 'tab' , $ ( this ) . parent ( ) . attr ( 'id' ) ) ;
97
+ var activeTab = Ethplorer . getActiveTab ( ) ;
98
+ if ( activeTab ) {
99
+ if ( activeTab != 'transfers' ) {
100
+ $ ( '#showTxChecks' ) . hide ( ) ;
101
+ } else {
102
+ $ ( '#showTxChecks' ) . show ( ) ;
103
+ }
104
+ }
97
105
if ( Ethplorer . data ) Ethplorer . showFilter ( Ethplorer . data ) ;
98
106
} ) ;
99
107
$ ( '.download' ) . click ( function ( ) {
@@ -983,6 +991,8 @@ Ethplorer = {
983
991
984
992
if ( data . contract && data . contract . txsCount && ( data . contract . txsCount > data . token . txsCount ) ) {
985
993
data . token . txsCount = data . contract . txsCount ;
994
+ }
995
+ if ( data . token && data . token . txsCount ) {
986
996
if ( data . token . txsCount > Ethplorer . maxListSize ) Ethplorer . maxListSize = data . token . txsCount ;
987
997
}
988
998
@@ -1162,6 +1172,11 @@ Ethplorer = {
1162
1172
showFilter : function ( data ) {
1163
1173
var activeTab = Ethplorer . getActiveTab ( ) ;
1164
1174
if ( activeTab && data . pager && data . pager [ activeTab ] ) {
1175
+ if ( activeTab != 'transfers' ) {
1176
+ $ ( '#showTxChecks' ) . hide ( ) ;
1177
+ } else {
1178
+ $ ( '#showTxChecks' ) . show ( ) ;
1179
+ }
1165
1180
if ( data . pager [ activeTab ] . records > 100000 || Ethplorer . maxListSize > 100000 ) {
1166
1181
$ ( '#filter_list' ) . hide ( ) ;
1167
1182
} else {
@@ -1252,7 +1267,7 @@ Ethplorer = {
1252
1267
var tableId = data . token ? 'address-token-transfers' : 'address-transfers' ;
1253
1268
$ ( '#' + tableId ) . find ( '.table' ) . empty ( ) ;
1254
1269
if ( Ethplorer . showTx && ! $ ( '#showTxEth' ) . length ) {
1255
- var showTxChecks = '<span style="color: white;vertical-align:middle;"><label for="showTxEth">ETH <sup class="diff-down">new</sup></label></span> <input onClick="Ethplorer.showTransfers(this, \'eth\');" id="showTxEth" type="checkbox" ' + ( ( Ethplorer . showTx == 'all' || Ethplorer . showTx == 'eth' ) ? 'checked="checked"' : '' ) + ' name="showTxEth" value="1" style="vertical-align: text-bottom;margin-right:5px;">' + ' <span style="color: white;vertical-align:middle;"><label for="showTxTokens">Tokens <sup class="diff-down">new</sup></label></span> <input onClick="Ethplorer.showTransfers(this, \'tokens\');" id="showTxTokens" type="checkbox" ' + ( ( Ethplorer . showTx == 'all' || Ethplorer . showTx == 'tokens' ) ? 'checked="checked"' : '' ) + ' name="showTxTokens" value="1" style="vertical-align: text-bottom;margin-right:5px;">' ;
1270
+ var showTxChecks = '<span id="showTxChecks"><span style="color: white;vertical-align:middle;"><label for="showTxEth">ETH <sup class="diff-down">new</sup></label></span> <input onClick="Ethplorer.showTransfers(this, \'eth\');" id="showTxEth" type="checkbox" ' + ( ( Ethplorer . showTx == 'all' || Ethplorer . showTx == 'eth' ) ? 'checked="checked"' : '' ) + ' name="showTxEth" value="1" style="vertical-align: text-bottom;margin-right:5px;">' + ' <span style="color: white;vertical-align:middle;"><label for="showTxTokens">Tokens <sup class="diff-down">new</sup></label></span> <input onClick="Ethplorer.showTransfers(this, \'tokens\');" id="showTxTokens" type="checkbox" ' + ( ( Ethplorer . showTx == 'all' || Ethplorer . showTx == 'tokens' ) ? 'checked="checked"' : '' ) + ' name="showTxTokens" value="1" style="vertical-align: text-bottom;margin-right:5px;"></span >' ;
1256
1271
1257
1272
if ( ! data . token ) {
1258
1273
$ ( '.filter-form' ) . prepend ( '<style>@media screen and (max-width: 501px) {.filter-box.out-of-tabs{height: 35px !important;}}</style>' + showTxChecks ) ;
0 commit comments