2015-11-23 21:31:15 +01:00
|
|
|
(function () {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
angular.module('OpenSlidesApp.motions.projector', ['OpenSlidesApp.motions'])
|
|
|
|
|
2016-01-17 21:16:04 +01:00
|
|
|
.config([
|
|
|
|
'slidesProvider',
|
|
|
|
function(slidesProvider) {
|
|
|
|
slidesProvider.registerSlide('motions/motion', {
|
|
|
|
template: 'static/templates/motions/slide_motion.html',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
])
|
2015-11-23 21:31:15 +01:00
|
|
|
|
2016-01-17 21:16:04 +01:00
|
|
|
.controller('SlideMotionCtrl', [
|
|
|
|
'$scope',
|
|
|
|
'Motion',
|
|
|
|
'User',
|
|
|
|
function($scope, Motion, 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;
|
2016-01-25 21:22:22 +01:00
|
|
|
|
|
|
|
// load motion object and related agenda item
|
|
|
|
Motion.find(id).then(function(motion) {
|
|
|
|
Motion.loadRelations(motion, 'agenda_item');
|
|
|
|
});
|
2016-01-17 21:16:04 +01:00
|
|
|
Motion.bindOne(id, $scope, 'motion');
|
2016-01-25 21:22:22 +01:00
|
|
|
|
|
|
|
// load all users
|
|
|
|
User.findAll();
|
|
|
|
User.bindAll({}, $scope, 'users');
|
2016-01-17 21:16:04 +01:00
|
|
|
}
|
|
|
|
]);
|
2015-11-23 21:31:15 +01:00
|
|
|
|
|
|
|
}());
|