diff --git a/public/src/css/common.css b/public/src/css/common.css index e342795..ff5038b 100644 --- a/public/src/css/common.css +++ b/public/src/css/common.css @@ -568,9 +568,6 @@ margin-left: 0; margin: 30px 0; } -.transaction-vin-vout .ellipsis { margin-bottom: 10px; } -.transaction-vin-vout .btc-value { margin-left: 15px; } - .page-header { margin-top: 0; } /* Index */ @@ -646,3 +643,18 @@ margin-left: 0; -webkit-animation-timing-function: linear; } +.transaction-vin-vout { + +} + +.v_hightlight { + background-color: #8DC429; + overflow: hidden; + color: #fff; +} + +a.v_hightlight_more { + background-color: #8DC429; + color: #fff; +} + diff --git a/public/src/js/config.js b/public/src/js/config.js index b1b66f8..a48a7f7 100644 --- a/public/src/js/config.js +++ b/public/src/js/config.js @@ -11,7 +11,7 @@ angular.module('insight').config(function($routeProvider) { controller: 'BlocksController', templateUrl: '/views/redirect.html' }). - when('/tx/:txId', { + when('/tx/:txId/:v_type?/:v_index?', { templateUrl: '/views/transaction.html', title: 'Bitcoin Transaction ' }). diff --git a/public/src/js/controllers/transactions.js b/public/src/js/controllers/transactions.js index e22897c..9dbf48b 100644 --- a/public/src/js/controllers/transactions.js +++ b/public/src/js/controllers/transactions.js @@ -58,14 +58,14 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans tmp[addr].doubleSpentIndex = tmp[addr].doubleSpentIndex || items[i].doubleSpentIndex; tmp[addr].unconfirmedInput += items[i].unconfirmedInput; tmp[addr].dbError = tmp[addr].dbError || items[i].dbError; - tmp[addr].valueSat += items[i].value * COIN; + tmp[addr].valueSat += Math.round(items[i].value * COIN); tmp[addr].items.push(items[i]); tmp[addr].notAddr = notAddr; tmp[addr].count++; } angular.forEach(tmp, function(v) { - v.value = parseInt(v.valueSat) / COIN; + v.value = v.value || parseInt(v.valueSat) / COIN; ret.push(v); }); return ret; @@ -154,6 +154,14 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans } }; + // Highlighted txout + if ($routeParams.v_type == '>' || $routeParams.v_type == '<') { + $scope.from_vin = $routeParams.v_type == '<' ? true : false; + $scope.from_vout = $routeParams.v_type == '>' ? true : false; + $scope.v_index = $routeParams.v_index; + $scope.itemsExpanded = true; + } + //Init without txs $scope.txs = []; diff --git a/public/views/transaction/tx.html b/public/views/transaction/tx.html index cd6c290..9491078 100644 --- a/public/views/transaction/tx.html +++ b/public/views/transaction/tx.html @@ -56,7 +56,7 @@
{{$root.currency.getConvertion(vin.value)}}
- {{$root.currency.getConvertion(vout.value)}} - (S) - (U) + {{$root.currency.getConvertion(vout.value)}} + (S) + (U)