Watch for changes of amendments in the motion detail view.

This commit is contained in:
FinnStutzenstein 2018-04-24 09:47:14 +02:00 committed by Emanuel Schütze
parent 198e19d3d1
commit 07f3880ad3

View File

@ -1484,6 +1484,12 @@ angular.module('OpenSlidesApp.motions.site', [
$scope.createChangeRecommendation.setVersion(motion, motion.active_version); $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 = [ $scope.projectionModes = [
{mode: 'original', {mode: 'original',
label: 'Original version'}, label: 'Original version'},
@ -1531,7 +1537,6 @@ angular.module('OpenSlidesApp.motions.site', [
if (motion.parent_id) { if (motion.parent_id) {
Motion.bindOne(motion.parent_id, $scope, 'parent'); Motion.bindOne(motion.parent_id, $scope, 'parent');
} }
$scope.amendments = Motion.filter({parent_id: motion.id});
$scope.highlight = 0; $scope.highlight = 0;
$scope.scrollToAndHighlight = function (line) { $scope.scrollToAndHighlight = function (line) {