Sha256: eb2f32a9fc7da2fff2d999afd227536d1f7552780f342eeafed2a432acf8fa77
Contents?: true
Size: 1.07 KB
Versions: 114
Compression:
Stored size: 1.07 KB
Contents
/** * @ngdoc object * @name Bastion.tasks.controller:TaskDetailsController * * @requires $scope * @requires $rootScope * @requires Task * * @description * Provides the functionality for the details of a task. */ angular.module('Bastion.tasks').controller('TaskDetailsController', ['$scope', '$rootScope', 'Task', function ($scope, $rootScope, Task) { var taskId; taskId = $scope.$stateParams.taskId; $scope.unregisterSearch = function () { Task.unregisterSearch($scope.searchId); $scope.searchId = undefined; }; $scope.updateTask = function (task) { $scope.task = task; if (!$scope.task.pending) { $rootScope.$broadcast('TaskFinished', $scope.task); $scope.unregisterSearch(); } }; $scope.isArray = _.isArray; $scope.$on('$destroy', function () { $scope.unregisterSearch(); }); $scope.searchId = Task.registerSearch({ 'type': 'task', 'task_id': taskId }, $scope.updateTask); } ]);
Version data entries
114 entries across 114 versions & 1 rubygems