Merge pull request #3718 from FinnStutzenstein/autoupdateAmendments

Watch for changes of amendments in the motion detail view.
This commit is contained in:
Emanuel Schütze 2018-04-24 11:38:56 +02:00 committed by GitHub
commit 334a6880b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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) {