Merge pull request #151 from colkito/fix/search-style
search style improved
This commit is contained in:
commit
ca6c2f6c83
|
@ -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*/
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue