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:
commit
09c3762a08
@ -34,6 +34,11 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.TagSearch-typeDropdown.is-single {
|
||||||
|
cursor: default;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.TagSearch-typeDropdown.is-open {
|
.TagSearch-typeDropdown.is-open {
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,9 @@ export default ['$scope', 'Refresh', 'tagSearchService',
|
|||||||
|
|
||||||
// shows/hide the search type dropdown
|
// shows/hide the search type dropdown
|
||||||
$scope.toggleTypeDropdown = function() {
|
$scope.toggleTypeDropdown = function() {
|
||||||
|
if ($scope.searchTypes.length > 1) {
|
||||||
$scope.showTypeDropdown = !$scope.showTypeDropdown;
|
$scope.showTypeDropdown = !$scope.showTypeDropdown;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// sets the search type dropdown and hides it
|
// sets the search type dropdown and hides it
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="TagSearch-bar">
|
<div class="TagSearch-bar">
|
||||||
<div class="TagSearch-typeDropdown"
|
<div class="TagSearch-typeDropdown"
|
||||||
ng-click="toggleTypeDropdown()"
|
ng-click="toggleTypeDropdown()"
|
||||||
ng-class="{'is-open': showTypeDropdown}"
|
ng-class="{'is-open': showTypeDropdown, 'is-single': searchTypes.length === 1}"
|
||||||
ng-cloak>
|
ng-cloak>
|
||||||
<span class="TagSearch-typeDropdownName" ng-cloak>
|
<span class="TagSearch-typeDropdownName" ng-cloak>
|
||||||
{{ currentSearchType.label }}
|
{{ currentSearchType.label }}
|
||||||
|
Loading…
Reference in New Issue
Block a user