diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6a20ef9e6..40a637e90 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,11 @@ Bugfixes: html tags for old and new text) [#3942]. - Fixed motion/amendment diff bug [#3943, #3946, #4020]. - Allow to hide internal items in agenda sort view [#3992]. + - Several minor bug fixes [#4023], especially: + + - Fixed motion slide: project diff mode by default (if selected in config) + - PDF export: Added missing alignment for pdf header logo (right). + - Fixed set motion block multi action. Version 2.3 (2018-09-20) diff --git a/openslides/core/static/js/core/pdf.js b/openslides/core/static/js/core/pdf.js index 61ceee2ea..bd4f0e57e 100644 --- a/openslides/core/static/js/core/pdf.js +++ b/openslides/core/static/js/core/pdf.js @@ -197,15 +197,20 @@ angular.module('OpenSlidesApp.core.pdf', []) }); } - var line1 = [ - Config.translate(Config.get('general_event_name').value), - Config.translate(Config.get('general_event_description').value) - ].filter(Boolean).join(' – '); - var line2 = [ - Config.get('general_event_location').value, - Config.get('general_event_date').value - ].filter(Boolean).join(', '); - var text = [line1, line2].join('\n'); + var text; + if (logoHeaderLeftUrl && logoHeaderRightUrl) { + text = ''; + } else { + var line1 = [ + Config.translate(Config.get('general_event_name').value), + Config.translate(Config.get('general_event_description').value) + ].filter(Boolean).join(' – '); + var line2 = [ + Config.get('general_event_location').value, + Config.get('general_event_date').value + ].filter(Boolean).join(', '); + text = [line1, line2].join('\n'); + } columns.push({ text: text, fontSize: 10, @@ -220,6 +225,7 @@ angular.module('OpenSlidesApp.core.pdf', []) columns.push({ image: logoHeaderRightUrl, fit: [180, 40], + alignment: 'right', width: '20%' }); } diff --git a/openslides/motions/static/js/motions/motion-services.js b/openslides/motions/static/js/motions/motion-services.js index f4b6a32ef..90133521a 100644 --- a/openslides/motions/static/js/motions/motion-services.js +++ b/openslides/motions/static/js/motions/motion-services.js @@ -609,17 +609,19 @@ angular.module('OpenSlidesApp.motions.motionservices', ['OpenSlidesApp.motions', }, function () { $scope.change_recommendations = []; $scope.title_change_recommendation = null; - MotionChangeRecommendation.filter({ - 'where': {'motion_version_id': {'==': motion.active_version}} - }).forEach(function (change) { - if (change.isTextRecommendation()) { - $scope.change_recommendations.push(change); - } - if (change.isTitleRecommendation()) { - $scope.title_change_recommendation = change; - } - }); - rebuild_amendments_crs(); + if (motion) { + MotionChangeRecommendation.filter({ + 'where': {'motion_version_id': {'==': motion.active_version}} + }).forEach(function (change) { + if (change.isTextRecommendation()) { + $scope.change_recommendations.push(change); + } + if (change.isTitleRecommendation()) { + $scope.title_change_recommendation = change; + } + }); + rebuild_amendments_crs(); + } }); $scope.$watch(function () { diff --git a/openslides/motions/static/js/motions/projector.js b/openslides/motions/static/js/motions/projector.js index f4af95f03..c48641178 100644 --- a/openslides/motions/static/js/motions/projector.js +++ b/openslides/motions/static/js/motions/projector.js @@ -72,13 +72,16 @@ angular.module('OpenSlidesApp.motions.projector', [ return Motion.lastModified(motionId); }, function () { $scope.motion = Motion.get(motionId); - $scope.amendment_diff_paragraphs = $scope.motion.getAmendmentParagraphsLinesDiff(); - $scope.viewChangeRecommendations.setVersion($scope.motion, $scope.motion.active_version); - _.forEach($scope.motion.polls, function (poll) { - MotionPollDecimalPlaces.getPlaces(poll, true).then(function (decimalPlaces) { - precisionCache[poll.id] = decimalPlaces; + if ($scope.motion) { + $scope.amendment_diff_paragraphs = $scope.motion.getAmendmentParagraphsLinesDiff(); + $scope.viewChangeRecommendations.setVersion($scope.motion, $scope.motion.active_version); + _.forEach($scope.motion.polls, function (poll) { + MotionPollDecimalPlaces.getPlaces(poll, true).then(function (decimalPlaces) { + precisionCache[poll.id] = decimalPlaces; + }); }); - }); + $scope.viewChangeRecommendations.initProjector($scope, $scope.motion, $scope.mode); + } }); var precisionCache = {}; diff --git a/openslides/motions/static/templates/motions/motion-detail.html b/openslides/motions/static/templates/motions/motion-detail.html index ae1d6b285..e9399c2b4 100644 --- a/openslides/motions/static/templates/motions/motion-detail.html +++ b/openslides/motions/static/templates/motions/motion-detail.html @@ -234,7 +234,7 @@