Fixed trivial change (disable versioning) checkboxes.

This commit is contained in:
Norman Jäckel 2016-11-29 16:39:54 +01:00
parent 0605395da2
commit e601ee8e24
2 changed files with 4 additions and 8 deletions

View File

@ -78,10 +78,6 @@ angular.module('OpenSlidesApp.motions.motionservices', ['OpenSlidesApp.motions',
motion = _motion;
obj.lineBrokenText = motion.getTextWithLineBreaks($scope.version);
obj.originalHtml = obj.lineBrokenText;
if (motion.state.versioning && Config.get('motions_allow_disable_versioning').value) {
obj.trivialChange = true;
}
};

View File

@ -1457,6 +1457,7 @@ angular.module('OpenSlidesApp.motions.site', [
// set initial values for form model by create deep copy of motion object
// so list/detail view is not updated while editing
$scope.model = angular.copy(motion);
$scope.model.disable_versioning = false;
$scope.model.more = false;
// get all form fields
@ -1479,10 +1480,9 @@ angular.module('OpenSlidesApp.motions.site', [
// get reason of latest version
$scope.formFields[i].defaultValue = motion.getReason(-1);
}
if ($scope.formFields[i].key == "disable_versioning" &&
Config.get('motions_allow_disable_versioning')) {
if ($scope.formFields[i].key == "disable_versioning") {
if (Config.get('motions_allow_disable_versioning').value && motion.state.versioning) {
// check current state if versioning is active
if (motion.state.versioning) {
$scope.formFields[i].hide = false;
}
}