From 43d973388137dcb748b485492e3bfd87167ee668 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 8 Nov 2016 13:00:50 +0100 Subject: [PATCH] fixing current list of speakers --- openslides/agenda/static/js/agenda/base.js | 4 ++-- openslides/core/static/js/core/base.js | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index 941241c21..a114268e7 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -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') { diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index b860e0165..ddb20759e 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -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}]