diff --git a/public/css/common.css b/public/css/common.css index cede0770..82e2d2e0 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -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*/ diff --git a/public/js/controllers/search.js b/public/js/controllers/search.js index eef77c59..f9dfbe5e 100644 --- a/public/js/controllers/search.js +++ b/public/js/controllers/search.js @@ -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;