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; }
|
#search { width: 300px; }
|
||||||
|
|
||||||
.no_matching {
|
.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;
|
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;
|
padding: 10px 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 46px;
|
text-align: center;
|
||||||
|
top: 45px;
|
||||||
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Animations*/
|
/*Animations*/
|
||||||
|
|
|
@ -8,26 +8,29 @@ angular.module('insight.search').controller('SearchController',
|
||||||
var q = $scope.q;
|
var q = $scope.q;
|
||||||
|
|
||||||
$scope.badQuery = false;
|
$scope.badQuery = false;
|
||||||
$scope.q = '';
|
|
||||||
|
|
||||||
BlockByHeight.get({
|
BlockByHeight.get({
|
||||||
blockHeight: q
|
blockHeight: q
|
||||||
}, function(hash) {
|
}, function(hash) {
|
||||||
|
$scope.q = '';
|
||||||
$location.path('/block/' + hash.blockHash);
|
$location.path('/block/' + hash.blockHash);
|
||||||
}, function() { // block by height not found
|
}, function() { // block by height not found
|
||||||
Block.get({
|
Block.get({
|
||||||
blockHash: q
|
blockHash: q
|
||||||
}, function() {
|
}, function() {
|
||||||
|
$scope.q = '';
|
||||||
$location.path('block/' + q);
|
$location.path('block/' + q);
|
||||||
}, function () { //block not found, search on TX
|
}, function () { //block not found, search on TX
|
||||||
Transaction.get({
|
Transaction.get({
|
||||||
txId: q
|
txId: q
|
||||||
}, function() {
|
}, function() {
|
||||||
|
$scope.q = '';
|
||||||
$location.path('tx/' + q);
|
$location.path('tx/' + q);
|
||||||
}, function () { //tx not found, search on Address
|
}, function () { //tx not found, search on Address
|
||||||
Address.get({
|
Address.get({
|
||||||
addrStr: q
|
addrStr: q
|
||||||
}, function() {
|
}, function() {
|
||||||
|
$scope.q = '';
|
||||||
$location.path('address/' + q);
|
$location.path('address/' + q);
|
||||||
}, function () { //address not found, fail :(
|
}, function () { //address not found, fail :(
|
||||||
$scope.badQuery = true;
|
$scope.badQuery = true;
|
||||||
|
|
Loading…
Reference in New Issue