From b419818b204e130c8810eb74620f07901278cda8 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Sun, 15 Jan 2017 12:04:16 +0100 Subject: [PATCH] Hotfix for motion projection --- openslides/motions/static/js/motions/site.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index be4db9191..9a593f671 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1075,6 +1075,7 @@ angular.module('OpenSlidesApp.motions.site', [ .controller('MotionDetailCtrl', [ '$scope', '$http', + '$timeout', 'operator', 'ngDialog', 'MotionForm', @@ -1095,7 +1096,7 @@ angular.module('OpenSlidesApp.motions.site', [ 'MotionCommentsInlineEditing', 'Projector', 'ProjectionDefault', - function($scope, $http, operator, ngDialog, MotionForm, + function($scope, $http, $timeout, operator, ngDialog, MotionForm, ChangeRecommmendationCreate, ChangeRecommmendationView, MotionChangeRecommendation, MotionPDFExport, Motion, MotionComment, Category, Mediafile, Tag, User, Workflow, Config, motion, MotionInlineEditing, MotionCommentsInlineEditing, Projector, ProjectionDefault) { @@ -1155,12 +1156,16 @@ angular.module('OpenSlidesApp.motions.site', [ } }; $scope.projectionMode = getProjectionMode(); + // TODO: Fix this timeout; check what mode is projected. $scope.setProjectionMode = function (mode) { $scope.projectionMode = mode; var projectedIds = motion.isProjected(); _.forEach(projectedIds, function (id) { motion.project(id, mode.mode); + $timeout(function () { + motion.project(id, mode.mode); + }, 100); }); }; $scope.commentsFields = Config.get('motions_comments').value;