1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Refactor styles and add queryset to updateDataset event emmitters

This commit is contained in:
Marliana Lara 2019-03-06 15:04:06 -05:00
parent 31f5d13a69
commit 2d15d13359
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
3 changed files with 6 additions and 26 deletions

View File

@ -71,25 +71,12 @@
.at-List-toolbar-item {
padding: 2px 10px;
border-left: 1px solid @at-color-list-border;
border-right: 1px solid @at-color-list-border;
&:hover {
cursor: pointer;
background: @at-gray-f2;
}
&:first-of-type {
border-right: none;
}
&:last-of-type {
border: none;
}
&:first-child {
border-left: 1px solid @at-color-list-border;
}
&.active {
background: @at-blue;
color: @at-white;
@ -98,12 +85,6 @@
.at-List-toolbarDropdown {
border-top-right-radius: @at-border-radius;
padding: 2px 10px;
&:hover {
cursor: pointer;
background: @at-gray-f2;
}
&-toggle {
background: none;

View File

@ -1,7 +1,7 @@
<div class="at-List-toolbar--attached">
<div ng-class="isCollapsed ? 'active' : ''" ng-if="!sortOnly" class="at-List-toolbar-item" ng-click="onCollapse()">{{ vm.strings.get('toolbar.COMPACT') }}</div>
<div ng-class="!isCollapsed ? 'active' : ''" ng-if="!sortOnly" class="at-List-toolbar-item" ng-click="onExpand()">{{ vm.strings.get('toolbar.EXPANDED') }}</div>
<div ng-if="sortOptions" class="at-List-toolbarDropdown dropdown">
<div ng-if="sortOptions" class="at-List-toolbar-item at-List-toolbarDropdown dropdown">
<button
class="at-List-toolbarDropdown-toggle dropdown-toggle"
data-display="static"

View File

@ -46,7 +46,7 @@ function SmartSearchController (
qs.search(path, queryset).then((res) => {
$scope.dataset = res.data;
$scope.collection = res.data.results;
$scope.$emit('updateDataset', res.data);
$scope.$emit('updateDataset', res.data, queryset);
});
$scope.searchTerm = null;
@ -77,7 +77,7 @@ function SmartSearchController (
}
$scope.dataset = res.data;
$scope.collection = res.data.results;
$scope.$emit('updateDataset', res.data);
$scope.$emit('updateDataset', res.data, queryset);
});
$scope.searchTerm = null;
@ -164,7 +164,6 @@ function SmartSearchController (
$scope.searchPlaceholder = i18n._('Search');
}
});
listenForTransitionSuccess();
});
@ -205,7 +204,7 @@ function SmartSearchController (
}
$scope.dataset = data;
$scope.collection = data.results;
$scope.$emit('updateDataset', data);
$scope.$emit('updateDataset', data, queryset);
})
.catch(() => revertSearch(unmodifiedQueryset));
@ -241,7 +240,7 @@ function SmartSearchController (
}
$scope.dataset = data;
$scope.collection = data.results;
$scope.$emit('updateDataset', data);
$scope.$emit('updateDataset', data, queryset);
});
generateSearchTags();
@ -271,7 +270,7 @@ function SmartSearchController (
}
$scope.dataset = data;
$scope.collection = data.results;
$scope.$emit('updateDataset', data);
$scope.$emit('updateDataset', data, queryset);
});
$scope.searchTags = qs.stripDefaultParams(queryset, defaults);