From f9325069cf3634b5be8ff5a0ec320e0c8b24f6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Ho=CC=88=C3=9Fl?= Date: Sat, 19 Nov 2016 13:19:08 +0100 Subject: [PATCH 1/2] Bugfix: Calling editing dialog during inline editing --- openslides/motions/static/js/motions/site.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index bfe0acc47..f5d9a7145 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1093,7 +1093,7 @@ angular.module('OpenSlidesApp.motions.site', [ // open edit dialog $scope.openDialog = function (motion) { if ($scope.inlineEditing.active) { - $scope.disableInlineEditing(); + $scope.inlineEditing.disable(); } ngDialog.open(MotionForm.getDialog(motion)); }; From ec635d97eeca251b90238d1e565451b5e72a2c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Ho=CC=88=C3=9Fl?= Date: Sat, 19 Nov 2016 13:33:06 +0100 Subject: [PATCH 2/2] Bugfix: Affected lines were selectable right after creating a change recommendation --- .../motions/static/js/motions/motion-services.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openslides/motions/static/js/motions/motion-services.js b/openslides/motions/static/js/motions/motion-services.js index 5bf1128c8..95990e4cb 100644 --- a/openslides/motions/static/js/motions/motion-services.js +++ b/openslides/motions/static/js/motions/motion-services.js @@ -315,6 +315,17 @@ angular.module('OpenSlidesApp.motions.motionservices', ['OpenSlidesApp.motions', $content.on("mouseover", ".line-numbers-outside .os-line-number.selectable", obj.mouseOver); $content.on("mouseover", ".motion-text-original", obj.startCreating); + $scope.$watch(function () { + return $scope.change_recommendations.length; + }, function () { + if (obj.mode == MODE_INACTIVE || obj.mode == MODE_SELECTING_FROM) { + // Recalculate the affected lines so we cannot select lines affected by a recommendation + // that has just been created + $(".motion-text-original .os-line-number").removeClass("selected selectable"); + obj.startCreating(); + } + }); + $scope.$on("$destroy", function () { obj.destroy(); });