search style improved

This commit is contained in:
Mario Colque 2014-01-24 12:08:09 -03:00
parent bf9c1ab440
commit b11a7e19a1
2 changed files with 15 additions and 3 deletions

View File

@ -264,11 +264,20 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
#search { width: 300px; }
.no_matching {
-moz-border-radius-bottomleft: 2px;
-moz-border-radius-bottomright: 2px;
-webkit-border-bottom-left-radius: 2px;
-webkit-border-bottom-right-radius: 2px;
background-color: #FFFFFF;
border: 2px solid #64920F;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
border-top: none;
border: 1px solid #64920F;
padding: 10px 20px;
position: absolute;
top: 46px;
text-align: center;
top: 45px;
width: 300px;
}
/*Animations*/

View File

@ -8,26 +8,29 @@ angular.module('insight.search').controller('SearchController',
var q = $scope.q;
$scope.badQuery = false;
$scope.q = '';
BlockByHeight.get({
blockHeight: q
}, function(hash) {
$scope.q = '';
$location.path('/block/' + hash.blockHash);
}, function() { // block by height not found
Block.get({
blockHash: q
}, function() {
$scope.q = '';
$location.path('block/' + q);
}, function () { //block not found, search on TX
Transaction.get({
txId: q
}, function() {
$scope.q = '';
$location.path('tx/' + q);
}, function () { //tx not found, search on Address
Address.get({
addrStr: q
}, function() {
$scope.q = '';
$location.path('address/' + q);
}, function () { //address not found, fail :(
$scope.badQuery = true;