Merge pull request #491 from cmgustavo/bug/01-ui

Bug/01 ui
This commit is contained in:
Mario Colque 2014-05-27 10:17:22 -03:00
commit 91b00a0088
11 changed files with 42 additions and 38 deletions

View File

@ -12,7 +12,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,400italic"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,400italic">
<link rel="stylesheet" href="/css/main.min.css"> <link rel="stylesheet" href="/css/main.min.css">
</head> </head>
<body> <body ng-cloak class="ng-cloak">
<div> <div>
<script type="text/ng-template" id="scannerModal.html"> <script type="text/ng-template" id="scannerModal.html">
<div class="modal-header"> <div class="modal-header">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -47,7 +47,7 @@ angular.module('insight')
$locationProvider.html5Mode(true); $locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!'); $locationProvider.hashPrefix('!');
}) })
.run(function($rootScope, $route, ngProgress) { .run(function($rootScope, $route, $location, $routeParams, $anchorScroll, ngProgress) {
$rootScope.$on('$routeChangeStart', function() { $rootScope.$on('$routeChangeStart', function() {
ngProgress.start(); ngProgress.start();
}); });
@ -60,5 +60,8 @@ angular.module('insight')
$rootScope.title = $route.current.title; $rootScope.title = $route.current.title;
$rootScope.isCollapsed = true; $rootScope.isCollapsed = true;
$rootScope.currentAddr = null; $rootScope.currentAddr = null;
$location.hash($routeParams.scrollTo);
$anchorScroll();
}); });
}); });

View File

@ -28,7 +28,7 @@
<span class="btn-copy" clip-copy="address.addrStr"></span> <span class="btn-copy" clip-copy="address.addrStr"></span>
</div> </div>
<h2>Summary <small>confirmed</small></h2> <h2>Summary <small>confirmed</small></h2>
<div class="ng-cloak row" data-ng-hide="!address.addrStr" data-ng-cloak> <div class="row" data-ng-hide="!address.addrStr">
<div class="col-md-10"> <div class="col-md-10">
<table class="table"> <table class="table">
<tbody> <tbody>

View File

@ -35,7 +35,7 @@
<div class="text-muted" data-ng-if="!block.hash"> <div class="text-muted" data-ng-if="!block.hash">
<span>Loading Block Information...</span> <span>Loading Block Information...</span>
</div> </div>
<div class="ng-cloak" data-ng-cloak data-ng-if="block.hash"> <div data-ng-if="block.hash">
<div class="well well-sm ellipsis"> <div class="well well-sm ellipsis">
<strong>BlockHash</strong> <strong>BlockHash</strong>
<span class="txid text-muted">{{block.hash}}</span> <span class="txid text-muted">{{block.hash}}</span>

View File

@ -15,7 +15,7 @@
<div class="m20v text-center text-muted" data-ng-if="!pagination.current"> <div class="m20v text-center text-muted" data-ng-if="!pagination.current">
<span>Loading Selected Date...</span> <span>Loading Selected Date...</span>
</div> </div>
<div class="ng-cloak" data-ng-cloak data-ng-if="pagination.current"> <div data-ng-if="pagination.current">
<p class="lead text-center m20v" data-ng-show="loading">&nbsp;</p> <p class="lead text-center m20v" data-ng-show="loading">&nbsp;</p>
<p class="text-center m20v" data-ng-show="pagination.isToday && !loading">Today</p> <p class="text-center m20v" data-ng-show="pagination.isToday && !loading">Today</p>
<p class="text-center m20v" data-ng-show="!pagination.isToday && !loading">{{humanSince(pagination.currentTs)}} <p class="text-center m20v" data-ng-show="!pagination.isToday && !loading">{{humanSince(pagination.currentTs)}}

View File

@ -43,7 +43,6 @@
<thead> <thead>
<tr> <tr>
<th>Hash</th> <th>Hash</th>
<th class="text-right">Size</th>
<th class="text-right">Value Out</th> <th class="text-right">Value Out</th>
</tr> </tr>
</thead> </thead>
@ -53,7 +52,6 @@
<td> <td>
<a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a> <a class="ellipsis" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
</td> </td>
<td class="text-right"><span class="ellipsis">{{tx.size}} bytes</span></td>
<td class="text-right"><span class="ellipsis">{{tx.valueOut}} BTC</span></td> <td class="text-right"><span class="ellipsis">{{tx.valueOut}} BTC</span></td>
</tr> </tr>
</tbody> </tbody>

View File

@ -2,11 +2,14 @@
<section data-ng-controller="transactionsController" data-ng-init="findThis()"> <section data-ng-controller="transactionsController" data-ng-init="findThis()">
<div class="secondary_navbar hidden-xs hidden-sm" scroll data-ng-class="{'hidden': !secondaryNavbar}" data-ng-show="tx.txid" data-ng-init="hideSNavbar=0"> <div class="secondary_navbar hidden-xs hidden-sm" scroll data-ng-class="{'hidden': !secondaryNavbar}" data-ng-show="tx.txid" data-ng-init="hideSNavbar=0">
<div class="container" data-ng-if="!hideSNavbar"> <div class="container" data-ng-if="!hideSNavbar">
<div class="col-md-8 text-left"> <div class="col-md-6 col-lg-7 text-left">
<h3>Transaction</h3> {{tx.txid}} <h3>Transaction</h3>
<span class="btn-copy" clip-copy="tx.txid"></span> <div class="ellipsis">
<small>{{tx.txid}}</small>
<span class="btn-copy" clip-copy="tx.txid"></span>
</div>
</div> </div>
<div class="col-md-4"> <div class="col-md-6 col-lg-5 text-right">
<span data-ng-show="tx.confirmations" class="txvalues txvalues-success">{{tx.confirmations}} Confirmations</span> <span data-ng-show="tx.confirmations" class="txvalues txvalues-success">{{tx.confirmations}} Confirmations</span>
<span data-ng-show="!tx.confirmations" class="txvalues txvalues-danger">Unconfirmed Transaction!</span> <span data-ng-show="!tx.confirmations" class="txvalues txvalues-danger">Unconfirmed Transaction!</span>
<span class="txvalues txvalues-primary">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC' }}</span> <span class="txvalues txvalues-primary">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC' }}</span>
@ -19,7 +22,7 @@
</a> </a>
</div> </div>
</div> </div>
<div class="ng-cloak" data-ng-cloak data-ng-if="tx.txid"> <div data-ng-if="tx.txid">
<h1>Transaction <h1>Transaction
<small data-ng-show="from_vin || from_vout"> <small data-ng-show="from_vin || from_vout">
<span data-ng-show="from_vin">Input</span> <span data-ng-show="from_vin">Input</span>
@ -68,7 +71,7 @@
</table> </table>
</div> </div>
<h2>Details</h2> <h2>Details</h2>
<div class="block-tx ng-cloak" data-ng-cloak data-ng-if="tx.txid"> <div class="block-tx" 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> </div>

View File

@ -1,14 +1,14 @@
<div class="line-bot row ng-cloak" data-ng-hide="!tx" data-ng-cloak> <div class="line-bot row" data-ng-hide="!tx">
<div class="col-xs-12 col-md-8"> <div class="col-xs-12 col-md-8">
<div class="h5 ellipsis"> <div class="ellipsis">
<a class="btn-expand m10h" href="#" title="Show/Hide items details" data-ng-click="itemsExpanded = !itemsExpanded"> <a class="btn-expand" href="#" title="Show/Hide items details" data-ng-click="itemsExpanded = !itemsExpanded">
<span class="glyphicon glyphicon-plus-sign" data-ng-class="{'glyphicon-minus-sign': itemsExpanded}"></span> <span class="glyphicon glyphicon-plus-sign" data-ng-class="{'glyphicon-minus-sign': itemsExpanded}"></span>
</a> </a>
<a class="txid" href="/tx/{{tx.txid}}">{{tx.txid}}</a> <a class="txid" href="/tx/{{tx.txid}}">{{tx.txid}}</a>
<span class="btn-copy" clip-copy="tx.txid"></span> <span class="btn-copy" clip-copy="tx.txid"></span>
</div> </div>
</div> </div>
<div class="col-xs-12 col-md-4 text-right"> <div class="col-xs-12 col-md-4 text-right text-muted">
<div data-ng-show="tx.firstSeenTs"> <div data-ng-show="tx.firstSeenTs">
first seen at first seen at
<time>{{tx.firstSeenTs * 1000 | date:'medium'}}</time> <time>{{tx.firstSeenTs * 1000 | date:'medium'}}</time>
@ -49,9 +49,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="showmore_collapse text-right" data-ng-show="tx.vinSimple.length > 5" data-ng-class="{ 'hidden': itemsExpanded}"> <div class="showmore_collapse text-left" data-ng-show="tx.vinSimple.length > 5" data-ng-class="{ 'hidden': itemsExpanded}">
<a href="#" ng-hide="sizeInNoExpanded != tx.vinSimple.length" ng-click="currentInNoExpanded=0; sizeInNoExpanded=5"><small>...less</small></a> <button type="button" class="btn btn-info btn-sm" ng-hide="sizeInNoExpanded != tx.vinSimple.length" ng-click="currentInNoExpanded=0; sizeInNoExpanded=5"><i class="glyphicon glyphicon-chevron-up"></i> Show less</button>
<a href="#" ng-hide="currentInNoExpanded >= tx.vinSimple.length/sizeInNoExpanded - 1" ng-click="currentInNoExpanded=0; sizeInNoExpanded=tx.vinSimple.length"><small>more...</small></a> <button type="button" class="btn btn-info btn-sm" ng-hide="currentInNoExpanded >= tx.vinSimple.length/sizeInNoExpanded - 1" ng-click="currentInNoExpanded=0; sizeInNoExpanded=tx.vinSimple.length"><i class="glyphicon glyphicon-chevron-down"></i> Show more</button>
</div> </div>
</div> </div>
@ -91,12 +91,12 @@
</div> </div>
</div> </div>
<div class="text-left"> <div class="text-left">
<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> <button type="button" class="btn btn-default btn-sm" data-ng-show="(from_vin) && tx.vin.length > 1" data-ng-disabled="fromVinCollapsed" data-ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length;fromVinCollapsed=1">Show input {{ v_index }}</button>
<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> <button type="button" class="btn btn-default btn-sm" data-ng-show="(from_vin) && tx.vin.length > 1" data-ng-disabled="!fromVinCollapsed" data-ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length;fromVinCollapsed=0">Show all</button>
</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-left" 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> <button type="button" class="btn btn-info btn-sm" ng-hide="sizeInExpanded != tx.vin.length" ng-click="currentInExpanded=0; sizeInExpanded=5"><i class="glyphicon glyphicon-chevron-up"></i> Show less</button>
<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> <button type="button" class="btn btn-info btn-sm" ng-hide="currentInExpanded >= tx.vin.length/sizeInExpanded - 1" ng-click="currentInExpanded=0; sizeInExpanded=tx.vin.length"><i class="glyphicon glyphicon-chevron-down"></i> Show more</button>
</div> </div>
</div> </div>
</div> </div>
@ -130,9 +130,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="showmore_collapse text-right" data-ng-show="tx.voutSimple.length > 5" data-ng-class="{ 'hidden': itemsExpanded}"> <div class="showmore_collapse text-left" data-ng-show="tx.voutSimple.length > 5" data-ng-class="{ 'hidden': itemsExpanded}">
<a href="#" ng-hide="sizeOutNoExpanded != tx.voutSimple.length" ng-click="currentOutNoExpanded=0; sizeOutNoExpanded=5"><small>...less</small></a> <button type="button" class="btn btn-info btn-sm" ng-hide="sizeOutNoExpanded != tx.voutSimple.length" ng-click="currentOutNoExpanded=0; sizeOutNoExpanded=5"><i class="glyphicon glyphicon-chevron-up"></i> Show less</button>
<a href="#" ng-hide="currentOutNoExpanded >= tx.voutSimple.length/sizeOutNoExpanded - 1" ng-click="currentOutNoExpanded=0; sizeOutNoExpanded=tx.voutSimple.length"><small>more...</small></a> <button type="button" class="btn btn-info btn-sm" ng-hide="currentOutNoExpanded >= tx.voutSimple.length/sizeOutNoExpanded - 1" ng-click="currentOutNoExpanded=0; sizeOutNoExpanded=tx.voutSimple.length"><i class="glyphicon glyphicon-chevron-down"></i> Show more</button>
</div> </div>
</div> </div>
@ -165,12 +165,12 @@
</div> </div>
</div> </div>
<div class="text-right"> <div class="text-right">
<a href="#" class="text-right" 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> <button type="button" class="btn btn-default btn-sm" data-ng-show="(from_vout) && tx.vout.length > 1" data-ng-disabled="fromVoutCollapsed" data-ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length;fromVoutCollapsed=1">Show output {{ v_index }}</button>
<a href="#" class="text-right" 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> <button type="button" class="btn btn-default btn-sm" data-ng-show="(from_vout) && tx.vout.length > 1" data-ng-disabled="!fromVoutCollapsed" data-ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length;fromVoutCollapsed=0">Show all</button>
</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-left" 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> <button type="button" class="btn btn-info btn-sm" ng-hide="sizeOutExpanded != tx.vout.length" ng-click="currentOutExpanded=0; sizeOutExpanded=5"><i class="glyphicon glyphicon-chevron-up"></i>Show less</button>
<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> <button type="button" class="btn btn-info btn-sm" ng-hide="currentOutExpanded >= tx.vout.length/sizeOutExpanded - 1" ng-click="currentOutExpanded=0; sizeOutExpanded=tx.vout.length"><i class="glyphicon glyphicon-chevron-down"></i> Show more</button>
</div> </div>
</div> </div>
</div> </div>
@ -182,7 +182,7 @@
<span class="btn-copy" clip-copy="tx.blockhash"></span> <span class="btn-copy" clip-copy="tx.blockhash"></span>
</div> </div>
<div class="line-top row ng-cloak" data-ng-hide="!tx" data-ng-cloak> <div class="line-top row" data-ng-hide="!tx">
<div class="col-xs-12 col-sm-4 col-md-4"> <div class="col-xs-12 col-sm-4 col-md-4">
<span data-ng-show="!tx.isCoinBase && !isNaN(parseFloat(tx.fees))" class="txvalues txvalues-default">Fees: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'BTC'}} </span> <span data-ng-show="!tx.isCoinBase && !isNaN(parseFloat(tx.fees))" class="txvalues txvalues-default">Fees: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'BTC'}} </span>
</div> </div>