diff --git a/openslides/agenda/templates/agenda/item_slide.html b/openslides/agenda/templates/agenda/item_slide.html
index f8fc53c8d..296fec8b2 100644
--- a/openslides/agenda/templates/agenda/item_slide.html
+++ b/openslides/agenda/templates/agenda/item_slide.html
@@ -5,6 +5,8 @@
-{% if item.text %}
- {{ item.text|safe|linebreaks }}
-{% endif %}
+
+ {% if item.text %}
+ {{ item.text|safe|linebreaks }}
+ {% endif %}
+
diff --git a/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html b/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html
index 97bfb329e..c6960681d 100644
--- a/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html
+++ b/openslides/agenda/templates/agenda/item_slide_list_of_speaker.html
@@ -21,7 +21,7 @@
{% if item.speaker_list_closed %}({% trans 'closed' %}){% endif %}
-
+
diff --git a/openslides/assignment/templates/assignment/slide.html b/openslides/assignment/templates/assignment/slide.html
index 93ffc00c1..70cc54c36 100644
--- a/openslides/assignment/templates/assignment/slide.html
+++ b/openslides/assignment/templates/assignment/slide.html
@@ -19,92 +19,94 @@
-{% if not assignment.candidates %}
-
-
{{ assignment.description|linebreaks }}
-
-{% endif %}
+
diff --git a/openslides/motion/templates/motion/slide.html b/openslides/motion/templates/motion/slide.html
index 18faa9671..7271091be 100644
--- a/openslides/motion/templates/motion/slide.html
+++ b/openslides/motion/templates/motion/slide.html
@@ -61,11 +61,11 @@
-
+
diff --git a/openslides/projector/api.py b/openslides/projector/api.py
index 6e818b2b6..0abc14650 100644
--- a/openslides/projector/api.py
+++ b/openslides/projector/api.py
@@ -65,6 +65,16 @@ def update_projector_overlay(overlay):
ProjectorSocketHandler.send_updates({'overlays': overlay_dict})
+def call_on_projector(calls):
+ """
+ Sends data to the projector.
+ """
+ projector_js_cache = config['projector_js_cache']
+ projector_js_cache.update(calls)
+ config['projector_js_cache'] = projector_js_cache
+ ProjectorSocketHandler.send_updates(json.dumps({'calls': calls}))
+
+
def get_projector_content(slide_dict=None):
"""
Returns the HTML-Content block of the projector.
diff --git a/openslides/projector/signals.py b/openslides/projector/signals.py
index b683d4945..65ffed53e 100644
--- a/openslides/projector/signals.py
+++ b/openslides/projector/signals.py
@@ -55,14 +55,18 @@ def config_variables(sender, **kwargs):
name='countdown_state',
default_value='inactive')
- bigger = ConfigVariable(
- name='bigger',
+ projector_scale = ConfigVariable(
+ name='projector_scale',
default_value=100)
- projector_up = ConfigVariable(
- name='up',
+ projector_scroll = ConfigVariable(
+ name='projector_scroll',
default_value=0)
+ projector_js_cache = ConfigVariable(
+ name='projector_js_cache',
+ default_value={})
+
projector_active_overlays = ConfigVariable(
name='projector_active_overlays',
default_value=[])
@@ -71,7 +75,8 @@ def config_variables(sender, **kwargs):
title='No title here', url='bar', required_permission=None, variables=(
projector, projector_message,
countdown_time, countdown_start_stamp, countdown_pause_stamp,
- countdown_state, bigger, projector_up, projector_active_overlays))
+ countdown_state, projector_scale, projector_scroll,
+ projector_active_overlays, projector_js_cache))
@receiver(projector_overlays, dispatch_uid="projector_countdown")
diff --git a/openslides/projector/static/javascript/projector.js b/openslides/projector/static/javascript/projector.js
index 09ad3920d..16dd75190 100644
--- a/openslides/projector/static/javascript/projector.js
+++ b/openslides/projector/static/javascript/projector.js
@@ -6,6 +6,7 @@
*/
$(document).ready(function() {
+ $('#content .scroll').wrap('');
if ($('#content.reload').length > 0) {
updater.start();
}
@@ -23,8 +24,17 @@ var projector = {
}
},
+ scroll: function(value) {
+ $('#content .scroll').css('margin-top', value + 'em')
+ },
+
+ scale: function(value) {
+ $('#content').css('font-size', value + '%');
+ $('#content #sidebar').css('font-size', '18px');
+ },
+
update_data: function(data) {
- $.each(data, function (key, value) {
+ $.each(data, function (key, value) {
if (key === 'load_file')
projector.load_file(value);
else
@@ -48,20 +58,29 @@ var updater = {
},
updateProjector: function(data) {
- $('#content').html(data.content);
- var overlays = data.overlays;
- $.each(overlays, function (key, value) {
- var overlay = $('#overlays #overlay_' + key)
- if (!value)
- overlay.remove();
- else {
- if (overlay.length) {
- overlay.html(value.html)
- } else {
- $('#overlays').append(value.html);
+ if (data.content) {
+ $('#content').html(data.content);
+ $('#content .scroll').wrap('');
+ }
+ if (data.overlays) {
+ $.each(data.overlays, function (key, value) {
+ var overlay = $('#overlays #overlay_' + key)
+ if (!value)
+ overlay.remove();
+ else {
+ if (overlay.length) {
+ overlay.html(value.html)
+ } else {
+ $('#overlays').append(value.html);
+ }
+ projector.update_data(value.javascript);
}
- projector.update_data(value.javascript);
- }
- });
+ });
+ }
+ if (data.calls) {
+ $.each(data.calls, function (call, argument) {
+ projector[call](argument);
+ });
+ }
}
};
diff --git a/openslides/projector/static/styles/projector.css b/openslides/projector/static/styles/projector.css
index f67467e29..8336e2afa 100644
--- a/openslides/projector/static/styles/projector.css
+++ b/openslides/projector/static/styles/projector.css
@@ -86,6 +86,13 @@ body{
top: 150px;
right: 40px;
z-index: -1;
+ transition: all 2s;
+}
+#content .scroll {
+ transition: margin 2s;
+}
+#content .scrollwrapper {
+ overflow: hidden;
}
h1 {
font-size: 45px !important;
diff --git a/openslides/projector/templates/projector.html b/openslides/projector/templates/projector.html
index 8f57a347d..357717e3f 100644
--- a/openslides/projector/templates/projector.html
+++ b/openslides/projector/templates/projector.html
@@ -40,6 +40,9 @@
{% for js in overlay_js %}
projector.update_data({{ js|safe }});
{% endfor %}
+ {% for key, value in calls.items %}
+ projector.{{ key }}({{ value }});
+ {% endfor %}