return defer.promise;
}
+ // returns a promise resolved with the list of circ mods
+ $scope.get_copy_statuses = function() {
+ if (egCore.env.ccm)
+ return $q.when(egCore.env.ccs.list);
+
+ return egCore.pcrud.retrieveAll('ccs', null, {atomic : true})
+ .then(function(list) {
+ egCore.env.absorbList(list, 'ccs');
+ return list;
+ });
+ };
+
$scope.mode = args.mode || 'checkin';
var next_statuses = [];
var seen_statuses = {};
+ $scope.next_statuses = [];
+ $scope.params = {
+ 'the_next_status' : null
+ }
init(args).then(function(copy_alerts) {
$scope.alerts = copy_alerts;
angular.forEach($scope.alerts, function(copy_alert) {
});
}
});
- });
-
- // returns a promise resolved with the list of circ mods
- $scope.get_copy_statuses = function() {
- if (egCore.env.ccm)
- return $q.when(egCore.env.ccs.list);
-
- return egCore.pcrud.retrieveAll('ccs', null, {atomic : true})
- .then(function(list) {
- egCore.env.absorbList(list, 'ccs');
- return list;
- });
- };
-
- $scope.next_statuses = [];
- $scope.params = {
- 'the_next_status' : null
- }
- if ($scope.mode == 'checkin' && next_statuses.length > 0) {
- $scope.get_copy_statuses().then(function() {
- angular.forEach(next_statuses, function(st) {
- $scope.next_statuses.push(egCore.env.ccs.list[st]);
+ if ($scope.mode == 'checkin' && next_statuses.length > 0) {
+ $scope.get_copy_statuses().then(function() {
+ angular.forEach(next_statuses, function(st) {
+ $scope.next_statuses.push(egCore.env.ccs.list[st]);
+ });
+ $scope.params.the_next_status = $scope.next_statuses[0].id();
});
- $scope.params.the_next_status = $scope.next_statuses[0].id();
- });
- }
+ }
+ });
$scope.isAcknowledged = function(copy_alert) {
return (copy_alert.acked);