Better keyboard handling and show score on results
This commit is contained in:
parent
951b0cbab8
commit
55a2c54ab6
3 changed files with 13 additions and 3 deletions
|
@ -156,9 +156,13 @@ nav.navbar-default .navbar-nav>li>a.active {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bar-element .search-results li a {
|
.header-bar-element .search-results li .score:before {
|
||||||
color: black;
|
content: "Score: ";
|
||||||
text-decoration: none !important;
|
}
|
||||||
|
|
||||||
|
.header-bar-element .search-results li .score {
|
||||||
|
float: right;
|
||||||
|
color: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-bar-element .search-results li .result-name {
|
.header-bar-element .search-results li .result-name {
|
||||||
|
|
|
@ -101,6 +101,7 @@
|
||||||
ng-class="searchResultState.current == $index ? 'current' : ''"
|
ng-class="searchResultState.current == $index ? 'current' : ''"
|
||||||
ng-click="showResult(result)">
|
ng-click="showResult(result)">
|
||||||
<span class="kind">{{ result.kind }}</span>
|
<span class="kind">{{ result.kind }}</span>
|
||||||
|
<span class="score">{{ result.score }}</span>
|
||||||
<span ng-switch on="result.kind">
|
<span ng-switch on="result.kind">
|
||||||
<!-- Team -->
|
<!-- Team -->
|
||||||
<span ng-switch-when="team">
|
<span ng-switch-when="team">
|
||||||
|
|
|
@ -91,6 +91,11 @@ angular.module('quay').directive('headerBar', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.handleSearchKeyDown = function(e) {
|
$scope.handleSearchKeyDown = function(e) {
|
||||||
|
if (e.keyCode == 27) {
|
||||||
|
$scope.toggleSearch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$scope.searchResultState) { return; }
|
if (!$scope.searchResultState) { return; }
|
||||||
|
|
||||||
if (e.keyCode == 40) {
|
if (e.keyCode == 40) {
|
||||||
|
|
Reference in a new issue