mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Applied select2 to the activity stream dropdown nav. Went ahead and moved the dropdown nav template into a partial rather than having it inline.
This commit is contained in:
parent
62ad03ce5a
commit
bf74cbc993
@ -181,6 +181,10 @@ table, tbody {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.List-auxActionStream {
|
||||
width: 175px;
|
||||
}
|
||||
|
||||
.List-buttonSubmit {
|
||||
background-color: @submit-button-bg;
|
||||
color: @submit-button-text;
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
export default [function() {
|
||||
export default ['templateUrl', function(templateUrl) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: true,
|
||||
replace: true,
|
||||
template: '<select class="form-control" ng-model="streamTarget" ng-options="opt.value as opt.label for opt in options" ng-change="changeStreamTarget()"></select>',
|
||||
controller: ['$scope', '$state', function($scope, $state) {
|
||||
templateUrl: templateUrl('activity-stream/streamDropdownNav/stream-dropdown-nav'),
|
||||
controller: ['$scope', '$state', 'CreateSelect2', function($scope, $state, CreateSelect2) {
|
||||
|
||||
$scope.streamTarget = ($state.params && $state.params.target) ? $state.params.target : 'dashboard';
|
||||
|
||||
@ -29,6 +29,11 @@ export default [function() {
|
||||
{label: 'Users', value: 'user'}
|
||||
];
|
||||
|
||||
CreateSelect2({
|
||||
element:'#stream-dropdown-nav',
|
||||
multiple: false
|
||||
});
|
||||
|
||||
$scope.changeStreamTarget = function(){
|
||||
|
||||
if($scope.streamTarget && $scope.streamTarget == 'dashboard') {
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
<div class="List-auxActionStream">
|
||||
<select id="stream-dropdown-nav" class="form-control" ng-model="streamTarget" ng-options="opt.value as opt.label for opt in options" ng-change="changeStreamTarget()">
|
||||
</select>
|
||||
</div>
|
||||
Loading…
x
Reference in New Issue
Block a user