Do not project more than one message

This commit is contained in:
FinnStutzenstein 2017-01-06 12:46:18 +01:00
parent f37ad0f6c3
commit c3fc7d0f1b
3 changed files with 9 additions and 2 deletions

View File

@ -31,7 +31,7 @@ Core:
- Added template hook system for plugins.
- Made a lot of code clean up, improvements and bug fixes in client and
backend.
- Use CKEditor for editin projector messages.
- Use CKEditor for editing projector messages.
Motions:
- Added adjustable line numbering mode (outside, inside, none) for each

View File

@ -778,6 +778,13 @@ angular.module('OpenSlidesApp.core', [
});
// if it was the same projector before, just delete it but not show again
if (_.indexOf(isProjectedIds, projectorId) == -1) {
// Now check whether other messages are already projected and delete them
var elements = Projector.get(projectorId).elements;
_.forEach(elements, function (element, uuid) {
if (element.name === name) {
$http.post('/rest/core/projector/' + projectorId + '/deactivate_elements/', [uuid]);
}
});
return $http.post(
'/rest/core/projector/' + projectorId + '/activate_elements/',
[{name: name, id: self.id, stable: true}]

View File

@ -61,7 +61,7 @@
</a>
</div>
<div class="btn-group" ng-show="projectors.length > 1">
<div class="btn-group nobr" ng-show="projectors.length > 1">
<button class="btn btn-sm" ng-class="broadcast == active_projector.id ? 'btn-primary' : 'btn-default'"
ng-click="active_projector.toggleBroadcast()" ng-disabled="broadcast > 0 && broadcast != active_projector.id">
<i class="fa" ng-class="broadcast == active_projector.id ? 'fa-star' : 'fa-star-o'"></i>