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'),
|
verboseName: gettext('List of speakers overlay'),
|
||||||
project: function (projectorId, overlay) {
|
project: function (projectorId, overlay) {
|
||||||
var isProjectedId = this.isProjected(overlay);
|
var isProjectedId = this.isProjected(overlay);
|
||||||
if (isProjectedId > 0) {
|
if (isProjectedId.length > 0) {
|
||||||
// Deactivate
|
// Deactivate
|
||||||
var projector = Projector.get(isProjectedId);
|
var projector = Projector.get(isProjectedId[0]);
|
||||||
var uuid;
|
var uuid;
|
||||||
_.forEach(projector.elements, function (element) {
|
_.forEach(projector.elements, function (element) {
|
||||||
if (element.name == 'agenda/current-list-of-speakers-overlay') {
|
if (element.name == 'agenda/current-list-of-speakers-overlay') {
|
||||||
|
@ -390,12 +390,12 @@ angular.module('OpenSlidesApp.core', [
|
|||||||
var BaseModel = function() {};
|
var BaseModel = function() {};
|
||||||
BaseModel.prototype.project = function(projectorId) {
|
BaseModel.prototype.project = function(projectorId) {
|
||||||
// if this object is already projected on projectorId, delete this element from this projector
|
// if this object is already projected on projectorId, delete this element from this projector
|
||||||
var isProjectedId = this.isProjected();
|
var isProjectedIds = this.isProjected();
|
||||||
if (isProjectedId > 0) {
|
if (isProjectedIds.length > 0) {
|
||||||
$http.post('/rest/core/projector/' + isProjectedId + '/clear_elements/');
|
$http.post('/rest/core/projector/' + isProjectedIds[0] + '/clear_elements/');
|
||||||
}
|
}
|
||||||
// if it was the same projector before, just delete it but not show again
|
// if it was the same projector before, just delete it but not show again
|
||||||
if (isProjectedId != projectorId) {
|
if (isProjectedIds[0] != projectorId) {
|
||||||
return $http.post(
|
return $http.post(
|
||||||
'/rest/core/projector/' + projectorId + '/prune_elements/',
|
'/rest/core/projector/' + projectorId + '/prune_elements/',
|
||||||
[{name: this.getResourceName(), id: this.id}]
|
[{name: this.getResourceName(), id: this.id}]
|
||||||
|
Loading…
Reference in New Issue
Block a user