fixing current list of speakers
This commit is contained in:
parent
8d4742ed29
commit
43d9733881
@ -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') {
|
||||
|
@ -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}]
|
||||
|
Loading…
Reference in New Issue
Block a user