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

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