From 187cb0c42fddd5f1b4d6d07152c8183b1c320738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Wed, 16 Sep 2015 23:48:27 +0200 Subject: [PATCH] Fixed blue line for active projector elements. --- openslides/core/static/js/core/core.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openslides/core/static/js/core/core.js b/openslides/core/static/js/core/core.js index 31762348d..79e999171 100644 --- a/openslides/core/static/js/core/core.js +++ b/openslides/core/static/js/core/core.js @@ -115,20 +115,20 @@ angular.module('OpenSlidesApp.core', [ '/rest/core/projector/1/prune_elements/', [{name: this.getResourceName(), id: this.id}] ); - } + }; BaseModel.prototype.isProjected = function() { // Returns true if there is a projector element with the same // name and the same id. var projector = Projector.get(1); if (typeof projector === 'undefined') return false; var self = this; - return _.findIndex(projector.elements, function(element) { + var predicate = function (element) { return element.name == self.getResourceName() && - typeof(element.context) !== 'undefined' && - typeof(element.context.id) !== 'undefined' && - element.context.id == self.id; - }) > -1; - } + typeof element.id !== 'undefined' && + element.id == self.id; + }; + return typeof _.findKey(projector.elements, predicate) === 'string'; + }; return BaseModel; }])