From 07f3880ad31cac777f82bd5cdfd6872821394ddd Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 24 Apr 2018 09:47:14 +0200 Subject: [PATCH] Watch for changes of amendments in the motion detail view. --- 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 ad5eb4b26..0748bea47 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1484,6 +1484,12 @@ angular.module('OpenSlidesApp.motions.site', [ $scope.createChangeRecommendation.setVersion(motion, motion.active_version); }); + $scope.$watch(function () { + return Motion.lastModified(); + }, function () { + $scope.motions = Motion.getAll(); + $scope.amendments = Motion.filter({parent_id: motion.id}); + }); $scope.projectionModes = [ {mode: 'original', label: 'Original version'}, @@ -1531,7 +1537,6 @@ angular.module('OpenSlidesApp.motions.site', [ if (motion.parent_id) { Motion.bindOne(motion.parent_id, $scope, 'parent'); } - $scope.amendments = Motion.filter({parent_id: motion.id}); $scope.highlight = 0; $scope.scrollToAndHighlight = function (line) {