diff --git a/awx/ui/static/js/controllers/JobEvents.js b/awx/ui/static/js/controllers/JobEvents.js index 4f75f04f76..690f7e5bcd 100644 --- a/awx/ui/static/js/controllers/JobEvents.js +++ b/awx/ui/static/js/controllers/JobEvents.js @@ -58,11 +58,10 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest, if (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 var found = false; - var start = (latest_node) ? latest_node : 0; - for (var i=start; i < set.length && found == false && scope.expand; i++) { + for (var i=0; i < set.length && found == false && scope.expand; i++) { if (set[i]['related']['children'] && (set[i]['ngicon'] == undefined || set[i]['ngicon'] == 'icon-expand-alt')) { found = true; ToggleChildren({ diff --git a/awx/ui/static/js/helpers/Children.js b/awx/ui/static/js/helpers/Children.js index 723a3aa5bc..f2ad38b5e2 100644 --- a/awx/ui/static/js/helpers/Children.js +++ b/awx/ui/static/js/helpers/Children.js @@ -81,7 +81,7 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities']) } clicked++; } - scope.$emit('setExpanded', clicked - 1); + scope.$emit('setExpanded'); }) .error( function(data, status, headers, config) { ProcessErrors(scope, data, status, null,