Job detail page refactor

Working through testing of task and play pagination changes. Fixed initial errors. More to do once API changes show up.
This commit is contained in:
Chris Houseknecht
2014-06-18 10:03:14 -04:00
parent c138f8006a
commit ef1ca7be0b
2 changed files with 4 additions and 6 deletions

View File

@@ -186,11 +186,9 @@ function JobDetailController ($rootScope, $scope, $compile, $routeParams, $log,
}
scope.removePlaysReady = scope.$on('PlaysReady', function() {
// Select the most recent play, which will trigger tasks and hosts to load
var ids = Object.keys(scope.plays),
lastPlay = (ids.length > 0) ? ids[ids.length - 1] : null;
SelectPlay({
scope: scope,
id: lastPlay,
id: ((scope.plays.length > 0) ? scope.plays[scope.plays.length - 1].id : null ),
callback: 'InitialDataLoaded'
});
});