mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 18:50:04 -03:30
Job events now expands all parent nodes correctly or consistently.
This commit is contained in:
@@ -58,11 +58,10 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
if (scope.removeSetExpanded) {
|
if (scope.removeSetExpanded) {
|
||||||
scope.removeSetExpanded();
|
scope.removeSetExpanded();
|
||||||
}
|
}
|
||||||
scope.removeSetExpanded = scope.$on('setExpanded', function(event, latest_node) {
|
scope.removeSetExpanded = scope.$on('setExpanded', function(event) {
|
||||||
// After ToggleChildren completes, look for the next parent that needs to be expanded
|
// After ToggleChildren completes, look for the next parent that needs to be expanded
|
||||||
var found = false;
|
var found = false;
|
||||||
var start = (latest_node) ? latest_node : 0;
|
for (var i=0; i < set.length && found == false && scope.expand; i++) {
|
||||||
for (var i=start; i < set.length && found == false && scope.expand; i++) {
|
|
||||||
if (set[i]['related']['children'] && (set[i]['ngicon'] == undefined || set[i]['ngicon'] == 'icon-expand-alt')) {
|
if (set[i]['related']['children'] && (set[i]['ngicon'] == undefined || set[i]['ngicon'] == 'icon-expand-alt')) {
|
||||||
found = true;
|
found = true;
|
||||||
ToggleChildren({
|
ToggleChildren({
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
|||||||
}
|
}
|
||||||
clicked++;
|
clicked++;
|
||||||
}
|
}
|
||||||
scope.$emit('setExpanded', clicked - 1);
|
scope.$emit('setExpanded');
|
||||||
})
|
})
|
||||||
.error( function(data, status, headers, config) {
|
.error( function(data, status, headers, config) {
|
||||||
ProcessErrors(scope, data, status, null,
|
ProcessErrors(scope, data, status, null,
|
||||||
|
|||||||
Reference in New Issue
Block a user