Merge pull request #3884 from FinnStutzenstein/fixes

Little fixes for current master (fixes #3883, fixes #3882, fixes #3880)
This commit is contained in:
Emanuel Schütze 2018-09-18 09:57:01 +02:00 committed by GitHub
commit 9432367f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 10 deletions

View File

@ -19,6 +19,7 @@ angular.module('OpenSlidesApp.motions.projector', [
.controller('SlideMotionCtrl', [
'$scope',
'$timeout',
'Config',
'Motion',
'MotionChangeRecommendation',
@ -27,8 +28,8 @@ angular.module('OpenSlidesApp.motions.projector', [
'Notify',
'ProjectorID',
'MotionPollDecimalPlaces',
function($scope, Config, Motion, MotionChangeRecommendation, ChangeRecommendationView, User,
Notify, ProjectorID, MotionPollDecimalPlaces) {
function($scope, $timeout, Config, Motion, MotionChangeRecommendation,
ChangeRecommendationView, User, Notify, ProjectorID, MotionPollDecimalPlaces) {
// Attention! Each object that is used here has to be dealt on server side.
// Add it to the coresponding get_requirements method of the ProjectorElement
// class.
@ -42,6 +43,10 @@ angular.module('OpenSlidesApp.motions.projector', [
if (!line) {
return;
}
$scope.highlight = line;
$timeout(function () {
$scope.highlight = 0;
}, 4000);
var scrollTop = null;
$('.line-number-' + line).each(function() {

View File

@ -1,4 +1,4 @@
<h1 translate>Choose the paragraph to amend!</h1>
<h1 translate>Please choose the paragraph to amend</h1>
<div uib-alert ng-show="alert.show" ng-class="'alert-' + (alert.type || 'warning')" close="alert={}">
{{ alert.msg }}

View File

@ -48,7 +48,8 @@
onaftersave="scrollToAndHighlight(gotoLinenumber)">
</span>
<div class="btn-group" ng-if="lineNumberMode != 'none'">
<button type="button" class="btn btn-sm btn-default" ng-click="lineNumberForm.$show()">
<button type="button" class="btn btn-sm btn-default" ng-click="lineNumberForm.$show()"
uib-tooltip="{{ 'Go to line' | translate }}">
<i class="fa fa-share"></i>
<translate>go</translate>
</button>
@ -56,7 +57,7 @@
ng-if="lineNumberMode != 'none' && motion.isProjected().length &&
operator.hasPerms('core.can_manage_projector')"
ng-click="toggleLinesForProjector()"
uib-tooltip="{{ 'Show highlighted line also on projector.' | translate }}">
uib-tooltip="{{ 'Show highlighted line also on projector' | translate }}">
<i class="fa" ng-class="linesForProjector ? 'fa-check-square-o' : 'fa-square-o'"></i>&nbsp;
<i class="fa fa-video-camera"></i>
</button>

View File

@ -94,7 +94,7 @@
<!-- Text -->
<!-- Original view -->
<div ng-if="mode == 'original'">
<div id="view-original-inline-editor" ng-bind-html="motion.getTextWithLineBreaks(null, line) | trusted"
<div id="view-original-inline-editor" ng-bind-html="motion.getTextWithLineBreaks(null, highlight) | trusted"
class="motion-text motion-text-original line-numbers-{{ config('motions_default_line_numbering') }}"
contenteditable="false"></div>
</div>
@ -130,19 +130,19 @@
<!-- Changed View -->
<div ng-if="mode == 'changed'">
<div ng-bind-html="motion.getTextByMode('changed', null, line) | trusted"
<div ng-bind-html="motion.getTextByMode('changed', null, highlight) | trusted"
class="motion-text motion-text-changed line-numbers-{{ config('motions_default_line_numbering') }}"></div>
</div>
<!-- Agreed View -->
<div ng-if="mode == 'agreed'">
<div ng-bind-html="motion.getTextByMode('agreed', null, line) | trusted"
<div ng-bind-html="motion.getTextByMode('agreed', null, highlight) | trusted"
class="motion-text motion-text-changed line-numbers-{{ config('motions_default_line_numbering') }}"></div>
</div>
<!-- Modified agreed View -->
<div ng-if="mode == 'modified_agreed'">
<div ng-bind-html="motion.getTextByMode('modified_agreed', null, line) | trusted"
<div ng-bind-html="motion.getTextByMode('modified_agreed', null, highlight) | trusted"
class="motion-text motion-text-changed line-numbers-{{ config('motions_default_line_numbering') }}"></div>
</div>

View File

@ -7,5 +7,5 @@ coverage
# Use master of flake8 until flake8 3.6 is released that supports python3.7
git+https://gitlab.com/pycqa/flake8.git
isort==4.2.5
mypy
mypy<=0.620
fakeredis