fixing current list of speakers

This commit is contained in:
FinnStutzenstein 2016-11-08 13:00:50 +01:00
parent 8d4742ed29
commit 43d9733881
2 changed files with 6 additions and 6 deletions

View File

@ -358,9 +358,9 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users'])
verboseName: gettext('List of speakers overlay'),
project: function (projectorId, overlay) {
var isProjectedId = this.isProjected(overlay);
if (isProjectedId > 0) {
if (isProjectedId.length > 0) {
// Deactivate
var projector = Projector.get(isProjectedId);
var projector = Projector.get(isProjectedId[0]);
var uuid;
_.forEach(projector.elements, function (element) {
if (element.name == 'agenda/current-list-of-speakers-overlay') {

View File

@ -390,12 +390,12 @@ angular.module('OpenSlidesApp.core', [
var BaseModel = function() {};
BaseModel.prototype.project = function(projectorId) {
// if this object is already projected on projectorId, delete this element from this projector
var isProjectedId = this.isProjected();
if (isProjectedId > 0) {
$http.post('/rest/core/projector/' + isProjectedId + '/clear_elements/');
var isProjectedIds = this.isProjected();
if (isProjectedIds.length > 0) {
$http.post('/rest/core/projector/' + isProjectedIds[0] + '/clear_elements/');
}
// if it was the same projector before, just delete it but not show again
if (isProjectedId != projectorId) {
if (isProjectedIds[0] != projectorId) {
return $http.post(
'/rest/core/projector/' + projectorId + '/prune_elements/',
[{name: this.getResourceName(), id: this.id}]