OpenSlides/openslides/assignments/static/js/assignments/projector.js
Oskar Hahn 6abb0976c2 Change system for autoupdate on the projector (#2394)
* Second websocket channel for the projector

* Removed use of projector requirements for REST API requests.

Refactored data serializing for projector websocket connection.

* Refactor the way that the projector autoupdate get its data.

* Fixed missing assignment slide title for hidden items.

* Release all items for item list slide and list of speakers slide. Fixed error with motion workflow.

* Created CollectionElement class which helps to handle autoupdate.
2016-09-17 22:26:23 +02:00

36 lines
947 B
JavaScript

(function () {
'use strict';
angular.module('OpenSlidesApp.assignments.projector', ['OpenSlidesApp.assignments'])
.config([
'slidesProvider',
function(slidesProvider) {
slidesProvider.registerSlide('assignments/assignment', {
template: 'static/templates/assignments/slide_assignment.html',
});
}
])
.controller('SlideAssignmentCtrl', [
'$scope',
'Assignment',
'User',
function($scope, Assignment, User) {
// Attention! Each object that is used here has to be dealt on server side.
// Add it to the coresponding get_requirements method of the ProjectorElement
// class.
var id = $scope.element.id;
var poll = $scope.element.poll;
Assignment.bindOne(id, $scope, 'assignment');
Assignment.getPhases().then(function(phases) {
$scope.phases = phases;
});
User.bindAll({}, $scope, 'users');
}
]);
}());