Go to original view after deleting the Title CR, if it is the last one - fixes #3645

This commit is contained in:
Tobias Hößl 2018-03-11 18:28:16 +01:00
parent a9e0f36ab9
commit b2043fa49d
No known key found for this signature in database
GPG Key ID: 1D780C7599C2D2A2

View File

@ -516,13 +516,18 @@ angular.module('OpenSlidesApp.motions.motionservices', ['OpenSlidesApp.motions',
$scope.$watch(function() {
return $('.change-recommendation-list').children().length;
}, obj.repositionOriginalAnnotations);
$scope.$watch(function () {
return $scope.change_recommendations.length;
}, function () {
if ($scope.change_recommendations.length === 0) {
var checkGotoOriginal = function () {
if ($scope.change_recommendations.length === 0 && $scope.title_change_recommendation === null) {
obj.mode = 'original';
}
});
};
$scope.$watch(function () {
return $scope.change_recommendations.length;
}, checkGotoOriginal);
$scope.$watch(function () {
return $scope.title_change_recommendation;
}, checkGotoOriginal);
var sizeCheckerLastSize = null,
sizeCheckerLastClass = null,