Merge pull request #3646 from CatoTH/Issue3645-Goto-Original-View-After-Deleting-Title-CR

Go to original view after deleting the Title CR...
This commit is contained in:
Emanuel Schütze 2018-03-15 12:42:06 +01:00 committed by GitHub
commit 78747fad35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,