fix names. reorder some layout `s elements.

This commit is contained in:
Gustavo Cortez 2014-02-24 10:45:14 -03:00
parent 462867b4e0
commit 576a1a896e
4 changed files with 30 additions and 46 deletions

View File

@ -158,7 +158,7 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans
if ($routeParams.v_type == '>' || $routeParams.v_type == '<') { if ($routeParams.v_type == '>' || $routeParams.v_type == '<') {
$scope.from_vin = $routeParams.v_type == '<' ? true : false; $scope.from_vin = $routeParams.v_type == '<' ? true : false;
$scope.from_vout = $routeParams.v_type == '>' ? true : false; $scope.from_vout = $routeParams.v_type == '>' ? true : false;
$scope.v_index = parseInt($routeParams.v_index) + 1; $scope.v_index = parseInt($routeParams.v_index);
$scope.itemsExpanded = true; $scope.itemsExpanded = true;
} }

View File

@ -2,7 +2,6 @@
<section data-ng-controller="BlocksController" data-ng-init="findOne()"> <section data-ng-controller="BlocksController" data-ng-init="findOne()">
<div class="row"> <div class="row">
<div class="col-xs-12 col-gray col-gray-fixed"> <div class="col-xs-12 col-gray col-gray-fixed">
<h1 class="text-center">Block</h1>
<div class="m20v text-center text-muted" data-ng-if="!block.hash"> <div class="m20v text-center text-muted" data-ng-if="!block.hash">
<span>Loading Block...</span> <span>Loading Block...</span>
</div> </div>
@ -16,7 +15,6 @@
<a class="ellipsis" href="/block/{{block.hash}}">{{block.hash}}</a> <a class="ellipsis" href="/block/{{block.hash}}">{{block.hash}}</a>
</div> </div>
<div class="m20v" data-ng-show="!tx.isCoinBase"> <div class="m20v" data-ng-show="!tx.isCoinBase">
<h4>Hashes</h4>
<table class="table" style="table-layout: fixed"> <table class="table" style="table-layout: fixed">
<tbody class="small"> <tbody class="small">
<tr data-ng-show="block.previousblockhash"> <tr data-ng-show="block.previousblockhash">
@ -35,7 +33,8 @@
</div> <!-- END OF COL-GRAY --> </div> <!-- END OF COL-GRAY -->
<div class="col-xs-12 col-md-9 col-md-offset-3"> <div class="col-xs-12 col-md-9 col-md-offset-3">
<h2>Summary</h2> <h1>Block #{{block.height}}</h1>
<h3>Summary</h3>
<div class="progress progress-striped active" data-ng-if="!block.hash"> <div class="progress progress-striped active" data-ng-if="!block.hash">
<div class="progress-bar progress-bar-info" style="width: 100%"> <div class="progress-bar progress-bar-info" style="width: 100%">
<span>Loading Block Details...</span> <span>Loading Block Details...</span>
@ -109,7 +108,7 @@
</div><!-- END OF ROW --> </div><!-- END OF ROW -->
<div data-ng-controller="transactionsController" data-ng-init="load('block')"> <div data-ng-controller="transactionsController" data-ng-init="load('block')">
<h2>Transactions <small >Transactions contained within this block</small></h2> <h3>Transactions</h3>
<div data-ng-include src="'/views/transaction/list.html'" when-scrolled="loadMore()"></div> <div data-ng-include src="'/views/transaction/list.html'" when-scrolled="loadMore()"></div>
</div> </div>
</div> </div>

View File

@ -3,7 +3,6 @@
<div class="row ng-cloak" data-ng-cloak data-ng-if="tx.txid"> <div class="row ng-cloak" data-ng-cloak data-ng-if="tx.txid">
<div class="col-xs-12 col-gray col-gray-fixed"> <div class="col-xs-12 col-gray col-gray-fixed">
<h1 class="text-center">Transaction</h1>
<div class="m20v text-center text-muted" data-ng-if="!tx.txid"> <div class="m20v text-center text-muted" data-ng-if="!tx.txid">
<span>Loading Transaction...</span> <span>Loading Transaction...</span>
</div> </div>
@ -41,10 +40,13 @@
<div data-ng-include src="'/views/includes/currency.html'"></div> <div data-ng-include src="'/views/includes/currency.html'"></div>
</div> </div>
<div class="col-xs-12 col-md-9 col-md-offset-3"> <div class="col-xs-12 col-md-9 col-md-offset-3">
<h2> <h1>Transaction
Details <small data-ng-show="from_vin || from_vout">
<small>View information about a bitcoin transaction</small> <span data-ng-show="from_vin">Input</span>
</h2> <span data-ng-show="from_vout">Output</span>
<span>{{v_index}}</span>
</small>
</h1>
<div class="progress progress-striped active" data-ng-if="!tx.txid"> <div class="progress progress-striped active" data-ng-if="!tx.txid">
<div class="progress-bar progress-bar-info" style="width: 100%"> <div class="progress-bar progress-bar-info" style="width: 100%">
<span>Loading Transaction Details...</span> <span>Loading Transaction Details...</span>
@ -53,25 +55,6 @@
<div class="block-tx ng-cloak" data-ng-cloak data-ng-if="tx.txid"> <div class="block-tx ng-cloak" data-ng-cloak data-ng-if="tx.txid">
<div data-ng-include src="'/views/transaction/tx.html'"></div> <div data-ng-include src="'/views/transaction/tx.html'"></div>
</div> </div>
<div class="ng-cloak" data-ng-cloak data-ng-if="tx.txid && !tx.isCoinBase">
<h2>Inputs and Outputs</h2>
<table class="table">
<tbody>
<tr>
<td><strong>Total Input</strong></td>
<td class="text-muted text-right">{{$root.currency.getConvertion(tx.valueIn)}}</td>
</tr>
<tr>
<td><strong>Total Output</strong></td>
<td class="text-muted text-right">{{$root.currency.getConvertion(tx.valueOut)}}</td>
</tr>
<tr>
<td><strong>Fees</strong></td>
<td class="text-muted text-right">{{$root.currency.getConvertion(tx.fees)}}</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div> </div>
</section> </section>

View File

@ -51,10 +51,10 @@
</div> </div>
<!-- Full view --> <!-- Full view -->
<div data-ng-if="itemsExpanded" data-ng-init="currentInExpanded=0; sizeInExpanded=(from_vin && v_index) ? tx.vin.length : 5; fromVinCollapsed=(from_vin && v_index)"> <div data-ng-if="itemsExpanded" data-ng-init="currentInExpanded=0; sizeInExpanded=(from_vin) ? tx.vin.length : 5; fromVinCollapsed=(from_vin)">
<a href="#" data-ng-show="(from_vin && v_index) && tx.vin.length > 1" data-ng-class="{'text-muted': fromVinCollapsed}" data-ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length;fromVinCollapsed=1"><small>only highlighted...</small></a> <a href="#" data-ng-show="(from_vin) && tx.vin.length > 1" data-ng-class="{'text-muted': fromVinCollapsed}" data-ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length;fromVinCollapsed=1"><small>show input {{ v_index }}</small></a>
<a href="#" data-ng-show="(from_vin && v_index) && tx.vin.length > 1" data-ng-class="{'text-muted': !fromVinCollapsed}" data-ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length;fromVinCollapsed=0"><small>expand all...</small></a> <a href="#" data-ng-show="(from_vin) && tx.vin.length > 1" data-ng-class="{'text-muted': !fromVinCollapsed}" data-ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length;fromVinCollapsed=0"><small>show all</small></a>
<div data-ng-repeat="vin in tx.vin| startFrom:currentInExpanded*sizeInExpanded | limitTo:sizeInExpanded" data-ng-if="fromVinCollapsed ? (v_index - 1) == vin.n : 1"> <div data-ng-repeat="vin in tx.vin| startFrom:currentInExpanded*sizeInExpanded | limitTo:sizeInExpanded" data-ng-if="fromVinCollapsed ? v_index == vin.n : 1">
<div class="col-md-12 transaction-vin-vout"> <div class="col-md-12 transaction-vin-vout">
<div class="pull-right btc-value"><p>{{$root.currency.getConvertion(vin.value)}}</p></div> <div class="pull-right btc-value"><p>{{$root.currency.getConvertion(vin.value)}}</p></div>
<div class="ellipsis"> <div class="ellipsis">
@ -70,7 +70,7 @@
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body" style="word-wrap:break-word" data-ng-class="{true: 'v_highlight', false: ''}[from_vin == true && (v_index - 1) == vin.n]"> <div class="panel-body" style="word-wrap:break-word" data-ng-class="{true: 'v_highlight', false: ''}[from_vin == true && v_index == vin.n]">
<small> <small>
<strong>scriptSig</strong> <strong>scriptSig</strong>
{{vin.scriptSig.asm}} {{vin.scriptSig.asm}}
@ -81,17 +81,19 @@
</div> </div>
<div class="showmore_collapse text-right" data-ng-show="tx.vin.length > 5 && !fromVinCollapsed" data-ng-class="{ 'hidden': !itemsExpanded}"> <div class="showmore_collapse text-right" data-ng-show="tx.vin.length > 5 && !fromVinCollapsed" data-ng-class="{ 'hidden': !itemsExpanded}">
<a href="#" ng-hide="sizeInExpanded != tx.vin.length" ng-click="currentInExpanded=0; sizeInExpanded=5"><small>...less</small></a> <a href="#" ng-hide="sizeInExpanded != tx.vin.length" ng-click="currentInExpanded=0; sizeInExpanded=5"><small>...less</small></a>
<a href="#" data-ng-class="{true: 'v_highlight_more', false: ''}[from_vin == true && (v_index - 1) > 5]" ng-hide="currentInExpanded >= tx.vin.length/sizeInExpanded - 1" ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length"><small>more...</small></a> <a href="#" data-ng-class="{true: 'v_highlight_more', false: ''}[from_vin == true && v_index > 5]" ng-hide="currentInExpanded >= tx.vin.length/sizeInExpanded - 1" ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length"><small>more...</small></a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-1 text-center hidden-xs hidden-sm"> <div class="col-md-1 col-xs-12">
<div class="hidden-xs hidden-sm text-center">
<span class="glyphicon glyphicon-chevron-right text-primary"></span> <span class="glyphicon glyphicon-chevron-right text-primary"></span>
</div> </div>
<div class="col-xs-12 text-center hidden-md hidden-lg"> <div class="hidden-md hidden-lg text-center">
<span class="glyphicon glyphicon-chevron-down text-primary"></span> <span class="glyphicon glyphicon-chevron-down text-primary"></span>
</div> </div>
</div>
<div class="col-md-6"> <div class="col-md-6">
<div class="row"> <div class="row">
@ -122,10 +124,10 @@
</div> </div>
<!-- Full view --> <!-- Full view -->
<div data-ng-if="itemsExpanded" data-ng-init="currentOutExpanded=0; sizeOutExpanded=(from_vout && v_index) ? tx.vout.length : 5; fromVoutCollapsed=(from_vout && v_index)"> <div data-ng-if="itemsExpanded" data-ng-init="currentOutExpanded=0; sizeOutExpanded=(from_vout) ? tx.vout.length : 5; fromVoutCollapsed=(from_vout)">
<a href="#" data-ng-show="(from_vout && v_index) && tx.vout.length > 1" data-ng-class="{'text-muted': fromVoutCollapsed}" data-ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length;fromVoutCollapsed=1"><small>only highlighted...</small></a> <a href="#" data-ng-show="(from_vout) && tx.vout.length > 1" data-ng-class="{'text-muted': fromVoutCollapsed}" data-ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length;fromVoutCollapsed=1"><small>show output {{ v_index }}</small></a>
<a href="#" data-ng-show="(from_vout && v_index) && tx.vout.length > 1" data-ng-class="{'text-muted': !fromVoutCollapsed}" data-ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length;fromVoutCollapsed=0"><small>expand all...</small></a> <a href="#" data-ng-show="(from_vout) && tx.vout.length > 1" data-ng-class="{'text-muted': !fromVoutCollapsed}" data-ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length;fromVoutCollapsed=0"><small>show all</small></a>
<div data-ng-repeat="vout in tx.vout| startFrom:currentOutExpanded*sizeOutExpanded | limitTo:sizeOutExpanded" data-ng-if="fromVoutCollapsed ? (v_index - 1) == vout.n : 1"> <div data-ng-repeat="vout in tx.vout| startFrom:currentOutExpanded*sizeOutExpanded | limitTo:sizeOutExpanded" data-ng-if="fromVoutCollapsed ? v_index == vout.n : 1">
<div class="col-md-12 transaction-vin-vout"> <div class="col-md-12 transaction-vin-vout">
<div class="pull-right btc-value"> <div class="pull-right btc-value">
<p>{{$root.currency.getConvertion(vout.value)}} <p>{{$root.currency.getConvertion(vout.value)}}
@ -139,7 +141,7 @@
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body" style="word-wrap:break-word" data-ng-class="{true: 'v_highlight', false: ''}[from_vout == true && (v_index - 1) == vout.n]"> <div class="panel-body" style="word-wrap:break-word" data-ng-class="{true: 'v_highlight', false: ''}[from_vout == true && v_index == vout.n]">
<small> <small>
<p> <p>
<strong>Type</strong> <strong>Type</strong>
@ -156,7 +158,7 @@
</div> </div>
<div class="showmore_collapse text-right" data-ng-show="tx.vout.length > 5 && !fromVoutCollapsed" data-ng-class="{ 'hidden': !itemsExpanded}"> <div class="showmore_collapse text-right" data-ng-show="tx.vout.length > 5 && !fromVoutCollapsed" data-ng-class="{ 'hidden': !itemsExpanded}">
<a href="#" ng-hide="sizeOutExpanded != tx.vout.length" ng-click="currentOutExpanded=0; sizeOutExpanded=5"><small>...less</small></a> <a href="#" ng-hide="sizeOutExpanded != tx.vout.length" ng-click="currentOutExpanded=0; sizeOutExpanded=5"><small>...less</small></a>
<a href="#" data-ng-class="{true: 'v_highlight_more', false: ''}[from_vout == true && (v_index - 1) > 5]" ng-hide="currentOutExpanded >= tx.vout.length/sizeOutExpanded - 1" ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length"><small>more...</small></a> <a href="#" data-ng-class="{true: 'v_highlight_more', false: ''}[from_vout == true && v_index > 5]" ng-hide="currentOutExpanded >= tx.vout.length/sizeOutExpanded - 1" ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length"><small>more...</small></a>
</div> </div>
</div> </div>
</div> </div>