From 7fcbed051c7c60e5aac64f8b58a0eab3a3266031 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Mon, 17 Oct 2016 08:05:40 +0200 Subject: [PATCH] Rename AdditionalId to arg (closes #2465) --- openslides/agenda/static/js/agenda/base.js | 3 +-- .../templates/assignments/assignment-detail.html | 2 +- openslides/core/static/js/core/base.js | 12 ++++++------ .../core/static/templates/projector-button.html | 16 ++++++++-------- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index e4be45c88..a399a6afd 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -369,9 +369,8 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users']) [{name: 'agenda/current-list-of-speakers-overlay',stable: true}]); } }, - isProjected: function (additionalId) { + isProjected: function () { // Returns the id of the last projector with an agenda-item element. Else return 0. - // additionalId is not needed var isProjected = 0; var predicate = function (element) { var value; diff --git a/openslides/assignments/static/templates/assignments/assignment-detail.html b/openslides/assignments/static/templates/assignments/assignment-detail.html index 1918e3d1a..f7290f495 100644 --- a/openslides/assignments/static/templates/assignments/assignment-detail.html +++ b/openslides/assignments/static/templates/assignments/assignment-detail.html @@ -163,7 +163,7 @@ + arg="poll.id" content="{{ 'Project' | translate }}"> diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index f4d263298..d25109b26 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -320,11 +320,11 @@ angular.module('OpenSlidesApp.core', [ * This places a projector button in the document. * * Example: + * arg="2" content="{{ 'project' | translate }}"> * This button references to model (in this example 'motion'). Also a defaultProjectionId * has to be given. In the example it's a scope variable. The next two parameters are additional: - * - additional-id: Then the model.project and model.isProjected will be called with - * this argument (e. g.: model.project(2)) + * - arg: Then the model.project and model.isProjected will be called with + * this argument (e. g.: model.project(2)) * - content: A text placed behind the projector symbol. */ .directive('projectorButton', [ @@ -350,9 +350,9 @@ angular.module('OpenSlidesApp.core', [ scope.defaultProjectorId = defaultProjectorId; }); - if (attributes.additionalId) { - scope.$watch(attributes.additionalId, function (id) { - scope.additionalId = id; + if (attributes.arg) { + scope.$watch(attributes.arg, function (arg) { + scope.arg = arg; }); } diff --git a/openslides/core/static/templates/projector-button.html b/openslides/core/static/templates/projector-button.html index 49415430e..91240dfab 100644 --- a/openslides/core/static/templates/projector-button.html +++ b/openslides/core/static/templates/projector-button.html @@ -1,24 +1,24 @@