From 2e898275cb0d18878027abe966cc29df3a013915 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Thu, 15 Jun 2017 14:25:55 +0200 Subject: [PATCH] Some small changes and bugfixes --- openslides/core/static/css/app.css | 1 + openslides/core/static/css/projector.css | 2 +- openslides/core/static/js/core/base.js | 4 ++-- openslides/motions/static/js/motions/base.js | 2 +- openslides/motions/static/js/motions/projector.js | 8 +++++++- openslides/motions/static/js/motions/site.js | 5 ++++- openslides/users/static/js/users/site.js | 3 ++- 7 files changed, 18 insertions(+), 7 deletions(-) diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index 5a833e477..1e77f6825 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -1567,6 +1567,7 @@ img { display: inline-block; padding: .4em .6em; margin-right: .2em; + white-space: normal; } /* for csv import form */ diff --git a/openslides/core/static/css/projector.css b/openslides/core/static/css/projector.css index 98a564979..d13746d09 100644 --- a/openslides/core/static/css/projector.css +++ b/openslides/core/static/css/projector.css @@ -282,7 +282,7 @@ hr { margin: 0 0 10px 10px; top: 0px; right: 0px; - padding: 23px 45px 0px 19px; + padding: 26px 45px 3px 19px; min-height: 72px; font-size: 3.7em; font-weight: bold; diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 5c64b99c3..588e01d81 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -610,8 +610,8 @@ angular.module('OpenSlidesApp.core', [ $timeout(function () { Messaging.createOrEditMessage( 'connectionLostMessage', - gettextCatalog.getString('Connection lost. You are not connected to the server anymore.'), - 'error', + gettextCatalog.getString('Offline mode: You can use OpenSlides but changes are not saved.'), + 'warning', {noClose: true}); }, 1); }, diff --git a/openslides/motions/static/js/motions/base.js b/openslides/motions/static/js/motions/base.js index 8c2390ae5..2134be584 100644 --- a/openslides/motions/static/js/motions/base.js +++ b/openslides/motions/static/js/motions/base.js @@ -566,7 +566,7 @@ angular.module('OpenSlidesApp.motions', [ } return value; }); - mode = mode || 'original'; + mode = mode || Config.get('motions_recommendation_text_mode').value; if (!wasProjectedBefore) { return $http.post( '/rest/core/projector/' + projectorId + '/prune_elements/', diff --git a/openslides/motions/static/js/motions/projector.js b/openslides/motions/static/js/motions/projector.js index 81bbb1de7..d0ae1c106 100644 --- a/openslides/motions/static/js/motions/projector.js +++ b/openslides/motions/static/js/motions/projector.js @@ -30,7 +30,13 @@ angular.module('OpenSlidesApp.motions.projector', [ Motion.bindOne(id, $scope, 'motion'); User.bindAll({}, $scope, 'users'); - MotionChangeRecommendation.bindAll({}, $scope, 'change_recommendations'); + MotionChangeRecommendation.bindAll({ + where: { + motion_version_id: { + '==': id, + }, + }, + }, $scope, 'change_recommendations'); } ]); diff --git a/openslides/motions/static/js/motions/site.js b/openslides/motions/static/js/motions/site.js index 38c271955..b7bf7734d 100644 --- a/openslides/motions/static/js/motions/site.js +++ b/openslides/motions/static/js/motions/site.js @@ -1245,7 +1245,10 @@ angular.module('OpenSlidesApp.motions.site', [ {mode: 'agreed', label: 'Final version'}, ]; - $scope.projectionMode = $scope.projectionModes[0]; + var motionDefaultTextMode = Config.get('motions_recommendation_text_mode').value; + $scope.projectionMode = _.find($scope.projectionModes, function (mode) { + return mode.mode == motionDefaultTextMode; + }); if (motion.isProjected().length) { var modeMapping = motion.isProjectedWithMode(); _.forEach($scope.projectionModes, function (mode) { diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index 96363a804..2917aa065 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -493,8 +493,9 @@ angular.module('OpenSlidesApp.users.site', [ 'osTableSort', 'gettext', 'UserPdfExport', + 'ErrorMessage', function($scope, $state, $http, $q, ngDialog, UserForm, User, Group, PasswordGenerator, Projector, ProjectionDefault, - Config, gettextCatalog, UserCsvExport, osTableFilter, osTableSort, gettext, UserPdfExport) { + Config, gettextCatalog, UserCsvExport, osTableFilter, osTableSort, gettext, UserPdfExport, ErrorMessage) { User.bindAll({}, $scope, 'users'); Group.bindAll({where: {id: {'>': 1}}}, $scope, 'groups'); $scope.$watch(function () {