Fix auto-udpates on run status page

This commit is contained in:
Ben Ramey
2014-05-13 13:50:39 -05:00
parent 605a004f8b
commit f6ea80207f

View File

@@ -23,8 +23,9 @@ lunchControllers.controller 'RunCtrl', ['$scope', 'socket', '$routeParams', ($sc
$scope.$apply()
socket.on 'message', (m) ->
if m.verb is 'update' and m.id is $routeParams.id
$scope.run = m.data
if m.verb is 'update' and m.data.run_id is $routeParams.id
invitee = _.findWhere $scope.invitees, run_id: m.data.run_id
_.extend invitee, m.data
$scope.setProgress()
$scope.setStatusClasses()
$scope.$apply()