Merge pull request #2945 from emanuelschuetze/assignment-projector-fix

Fixed outdated assignment phases variable in projetor.js.
This commit is contained in:
Emanuel Schütze 2017-02-10 23:36:15 +01:00 committed by GitHub
commit 75fa1fdb7b
3 changed files with 3 additions and 6 deletions

View File

@ -324,7 +324,6 @@ angular.module('OpenSlidesApp.assignments', [])
'gettext',
function ($http, DS, Projector, AssignmentRelatedUser, AssignmentPoll, jsDataModel, gettext) {
var name = 'assignments/assignment';
var phases;
return DS.defineResource({
name: name,
useClass: jsDataModel,

View File

@ -16,8 +16,9 @@ angular.module('OpenSlidesApp.assignments.projector', ['OpenSlidesApp.assignment
.controller('SlideAssignmentCtrl', [
'$scope',
'Assignment',
'AssignmentPhases',
'User',
function($scope, Assignment, User) {
function($scope, Assignment, AssignmentPhases, 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.
@ -25,9 +26,7 @@ angular.module('OpenSlidesApp.assignments.projector', ['OpenSlidesApp.assignment
$scope.showResult = $scope.element.poll;
Assignment.bindOne(id, $scope, 'assignment');
Assignment.getPhases().then(function(phases) {
$scope.phases = phases;
});
$scope.phases = AssignmentPhases;
User.bindAll({}, $scope, 'users');
}
]);

View File

@ -274,7 +274,6 @@
uib-tooltip="{{ 'Project the current list of speakers' | translate }}"
os-perms="core.can_manage_projector">
<button type="button" class="btn btn-default btn-sm"
title="{{ 'Project current list of speakers' | translate }}"
ng-click="currentListOfSpeakers.project(listOfSpeakersDefaultProjectorId, currentListOfSpeakersAsOverlay)"
ng-class="{ 'btn-primary': currentListOfSpeakers.isProjected().length && inArray(currentListOfSpeakers.isProjected(), listOfSpeakersDefaultProjectorId)}">
<i class="fa fa-video-camera"></i>