1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Merge pull request #2575 from jlmitch5/fixTagSearchSingleClickable

make single tag search bars have their filter type non-clickable
This commit is contained in:
jlmitch5 2016-06-23 11:26:49 -04:00 committed by GitHub
commit 09c3762a08
3 changed files with 9 additions and 2 deletions

View File

@ -34,6 +34,11 @@
position: relative;
}
.TagSearch-typeDropdown.is-single {
cursor: default;
padding-right: 12px;
}
.TagSearch-typeDropdown.is-open {
border-bottom-left-radius: 0;
}

View File

@ -15,7 +15,9 @@ export default ['$scope', 'Refresh', 'tagSearchService',
// shows/hide the search type dropdown
$scope.toggleTypeDropdown = function() {
$scope.showTypeDropdown = !$scope.showTypeDropdown;
if ($scope.searchTypes.length > 1) {
$scope.showTypeDropdown = !$scope.showTypeDropdown;
}
};
// sets the search type dropdown and hides it

View File

@ -3,7 +3,7 @@
<div class="TagSearch-bar">
<div class="TagSearch-typeDropdown"
ng-click="toggleTypeDropdown()"
ng-class="{'is-open': showTypeDropdown}"
ng-class="{'is-open': showTypeDropdown, 'is-single': searchTypes.length === 1}"
ng-cloak>
<span class="TagSearch-typeDropdownName" ng-cloak>
{{ currentSearchType.label }}