diff --git a/CHANGELOG b/CHANGELOG index fc285a0bc..114b67412 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,14 +16,14 @@ Motions: settings [#3187]. - Fixed empty motion comment field in motion update form [#3194]. - Removed server side image to base64 transformation and - added local transformation [#2705] + added local transformation [#3181] - Added support for export motions in a zip archive [#3189]. - Bugfix: changing motion line length did not invalidate cache [#3202] Core: - No reload on logoff. OpenSlides is now a full single page application [#3172]. -- Adding support for choosing image files as logos [#3184]. +- Adding support for choosing image files as logos [#3184, #3207]. - Fixing error when clearing empty chat [#3199]. Users: diff --git a/openslides/core/config_variables.py b/openslides/core/config_variables.py index 4119f7ecb..e67944784 100644 --- a/openslides/core/config_variables.py +++ b/openslides/core/config_variables.py @@ -139,8 +139,8 @@ def get_config_variables(): default_value=True, input_type='boolean', label='Show logo on projector', - help_text='You can replace the logo. Just copy a file to ' - '"static/img/logo-projector.png" in your OpenSlides data path.', + help_text='You can replace the logo by uploading an image and set it as ' + 'the "main projector logo" in "files".', weight=150, group='Projector') @@ -152,6 +152,14 @@ def get_config_variables(): weight=155, group='Projector') + yield ConfigVariable( + name='projector_enable_clock', + default_value=True, + input_type='boolean', + label='Show the clock on projector', + weight=156, + group='Projector') + yield ConfigVariable( name='projector_header_backgroundcolor', default_value='#317796', @@ -213,7 +221,9 @@ def get_config_variables(): # Logos. yield ConfigVariable( name='logos_available', - default_value=['logo_projector_main'], + default_value=[ + 'logo_projector_main', + 'logo_projector_header'], weight=300, group='Logo', hidden=True) @@ -227,3 +237,13 @@ def get_config_variables(): weight=301, group='Logo', hidden=True) + + yield ConfigVariable( + name='logo_projector_header', + default_value={ + 'display_name': 'Projector header image', + 'path': ''}, + input_type='logo', + weight=302, + group='Logo', + hidden=True) diff --git a/openslides/core/static/css/projector.css b/openslides/core/static/css/projector.css index 24e41cc96..98a564979 100644 --- a/openslides/core/static/css/projector.css +++ b/openslides/core/static/css/projector.css @@ -94,6 +94,8 @@ body { /*** HEADER ***/ #header { + background-repeat: no-repeat; + background-size: 100% 100%; box-shadow: 0 0 7px rgba(0,0,0,0.6); height: 70px; margin-bottom: 20px; diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 8b3a76d76..6307c6b02 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -595,9 +595,11 @@ angular.module('OpenSlidesApp.core', [ }); }, getFromKey: function (key) { - var config = Config.get(key).value; - config.key = key; - return config; + var config = Config.get(key); + if (config) { + config.value.key = key; + return config.value; + } }, isMediafileUsedAsLogo: function (mediafile) { return _.find(this.getAll(), function (logoPlaceholder) { diff --git a/openslides/core/static/js/core/projector.js b/openslides/core/static/js/core/projector.js index b70a05101..8a0d89660 100644 --- a/openslides/core/static/js/core/projector.js +++ b/openslides/core/static/js/core/projector.js @@ -158,9 +158,12 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core']) var setElements = function (projector) { $scope.elements = []; - _.forEach(slides.getElements(projector), function(element) { + _.forEach(slides.getElements(projector), function (element) { if (!element.error) { - $scope.elements.push(element); + // Exclude the clock if it should be disabled. + if (Config.get('projector_enable_clock').value || element.name !== 'core/clock') { + $scope.elements.push(element); + } } else { console.error("Error for slide " + element.name + ": " + element.error); } @@ -244,10 +247,11 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core']) } }); - $scope.getLogo = function (key) { - var logo = Logos.getFromKey(key); - return logo ? logo.path : void 0; - }; + $scope.$watch(function () { + return Config.lastModified('projector_enable_clock'); + }, function () { + setElements($scope.projector); + }); $scope.$on('$destroy', function() { if ($scope.broadcastDeregister) { diff --git a/openslides/core/static/templates/projector.html b/openslides/core/static/templates/projector.html index ea574438f..28196313a 100644 --- a/openslides/core/static/templates/projector.html +++ b/openslides/core/static/templates/projector.html @@ -31,10 +31,15 @@ } +