OpenSlides/openslides/motions/static/js/motions/projector.js
Emanuel Schuetze 23503eb4ba Several template fixes and clean up
- Use ng-cloak for hide template parts while loading.
- Set html lang attribute dynamically (Fixes #1546)
- Clean up: Rename 'dashboard' to 'home'.
- Show duration of speech in minutes. (Fixes #1882)
- Save agenda specific stuff for customslides. (Fixes #1887)
- Remove title from QuickEdit from.
- Checkbox for item.closed is now visible for manager only.
- Agenda list view: Show list of speakers link also for normal users.
- Improve slide templates: Show agenda item number and subtitle.
- Fixed agenda title for motions and assignments.
  (Don't load motions and assignmetn in agenda app.)
- Added missing seach template.
2016-01-27 12:10:40 +01:00

39 lines
982 B
JavaScript

(function () {
'use strict';
angular.module('OpenSlidesApp.motions.projector', ['OpenSlidesApp.motions'])
.config([
'slidesProvider',
function(slidesProvider) {
slidesProvider.registerSlide('motions/motion', {
template: 'static/templates/motions/slide_motion.html',
});
}
])
.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;
// load motion object and related agenda item
Motion.find(id).then(function(motion) {
Motion.loadRelations(motion, 'agenda_item');
});
Motion.bindOne(id, $scope, 'motion');
// load all users
User.findAll();
User.bindAll({}, $scope, 'users');
}
]);
}());