Skip to content

Commit

Permalink
Some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKo7v committed Dec 16, 2016
1 parent ffaf6a9 commit cd1581f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
9 changes: 7 additions & 2 deletions css/ethplorer.css
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ small {
display: none;
}

.token-name a.token-update,
.address-token-name a.token-update {
a.token-update {
position: absolute;
right: 0px;
margin-right: 30px;
Expand All @@ -434,6 +433,12 @@ small {
color: #337ab7 !important;
}

@media screen and (max-width: 479px) {
a.token-update {
display: none;
}
}

@media screen and (max-width: 767px) {

.multiop tr td:nth-child(3),
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="/js/bignumber.js?v=3"></script>
<script src="/js/ethplorer.js?v=4"></script>
<script src="/js/bignumber.js?v=5"></script>
<script src="/js/ethplorer.js?v=5"></script>
<script src="/cfg/config.ethplorer.js?v=3"></script>
</head>
<body>
Expand Down Expand Up @@ -304,7 +304,7 @@ <h3>Internal operations</h3>
</div>
<div class="col-xs-12" id="address-token-transfers" style="display:none;">
<div class="block">
<div class="block-header"><h3>Token <span class="address-token-name"></span> Last 50 Transfers</h3></div>
<div class="block-header"><h3>Token <span class="address-token-name"></span> Transfers</h3></div>
<table class="table"></table>
<div id="address-token-transfers-more" class="text-center"></div>
</div>
Expand Down
11 changes: 6 additions & 5 deletions js/ethplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,6 @@ Ethplorer = {
);
}

/*
if(Ethplorer.Config.updateLink){
$('.token-name:eq(1)').append('<a href="' + Ethplorer.Config.updateLink + '" target="_blank" class="token-update">Update</a>');
}
*/
txData.token = oToken;

Ethplorer.fillValues('transaction', txData, ['token', 'token.timestamp', 'token.contract', 'token.symbol', 'token.decimals', 'token.owner', 'token.totalSupply']);
Expand Down Expand Up @@ -449,6 +444,9 @@ Ethplorer = {
$('.address-token-name:eq(0)').append('<a href="' + Ethplorer.Config.updateLink + '" target="_blank" class="token-update">Update</a>')
}
if(data.issuances && data.issuances.length){
if(50 === data.issuances.length){
$('#address-issuances .block-header').html($('#address-issuances .block-header').html().replace('Issuances', 'Last 50 Issuances'))
}
$('#address-issuances').show();
for(var i=0; i<data.issuances.length; i++){
var tx = data.issuances[i];
Expand Down Expand Up @@ -490,6 +488,9 @@ Ethplorer = {
if(data.transfers && data.transfers.length){
var tableId = data.token ? 'address-token-transfers' : 'address-transfers';
$('#' + tableId).show();
if(50 === data.transfers.length){
$('#' + tableId + ' .block-header').html($('#' + tableId + ' .block-header').html().replace('Transfers', 'Last 50 Transfers'))
}
for(var i=0; i<data.transfers.length; i++){
var tx = data.transfers[i];
var qty = Ethplorer.Utils.toBig(tx.value);
Expand Down
7 changes: 2 additions & 5 deletions service/lib/ethplorer.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ public function getAddressDetails($address, $limit = 50){
if($result['isContract'] && isset($result['token'])){
$result["transfers"] = $this->getContractTransfers($address, $limit);
$result["issuances"] = $this->getContractIssuances($address, $limit);
if(empty($result["issuances"])){
$result["issuances"] = $this->getContractOperation('mint', $address, $limit);
}
if(empty($result["issuances"])){
unset($result["issuances"]);
}
Expand Down Expand Up @@ -315,7 +312,7 @@ public function getTransfers($tx){
* @return array
*/
public function getIssuances($tx){
return $this->getOperations($tx, 'issuance');
return $this->getOperations($tx, array('$in' => array('issuance', 'burn', 'mint')));
}

/**
Expand Down Expand Up @@ -437,7 +434,7 @@ public function getContractTransfers($address, $limit = 10){
* @return array
*/
public function getContractIssuances($address, $limit = 10){
return $this->getContractOperation('issuance', $address, $limit);
return $this->getContractOperation(array('$in' => array('issuance', 'burn', 'mint')), $address, $limit);
}

/**
Expand Down

0 comments on commit cd1581f

Please sign in to comment.