From 719ea6ec7952451c1c11b4fd73dfe2968f38b861 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Tue, 24 Apr 2012 22:27:16 +0200 Subject: [PATCH] #93: Show application number in header of projector template. Some more projetor style work. --- .../templates/projector/AgendaSummary.html | 11 ++++++----- .../templates/projector/AgendaText.html | 7 ++++++- .../templates/projector/Application.html | 5 ++++- .../templates/projector/Assignment.html | 2 ++ .../projector/static/javascript/projector.js | 11 +++++++---- .../projector/static/styles/projector.css | 19 +++++++++++-------- .../projector/templates/base-projector.html | 14 +++++++++++--- openslides/projector/views.py | 11 ++++++++--- 8 files changed, 55 insertions(+), 25 deletions(-) diff --git a/openslides/agenda/templates/projector/AgendaSummary.html b/openslides/agenda/templates/projector/AgendaSummary.html index 6264500be..8c1926aa1 100644 --- a/openslides/agenda/templates/projector/AgendaSummary.html +++ b/openslides/agenda/templates/projector/AgendaSummary.html @@ -1,5 +1,4 @@ - -{% extends "base-projector.html" %} +{% extends "base-projector.html" %} {% load i18n %} @@ -9,10 +8,12 @@ {% block content %}

{%trans "Agenda" %}

+{% endblock %} + +{% block scrollcontent %} + {% endblock %} - diff --git a/openslides/agenda/templates/projector/AgendaText.html b/openslides/agenda/templates/projector/AgendaText.html index fff0f3fb7..f691ad755 100644 --- a/openslides/agenda/templates/projector/AgendaText.html +++ b/openslides/agenda/templates/projector/AgendaText.html @@ -7,8 +7,13 @@ {% block content %} {% if item.get_text %}

{{ item }}

- {{ item.get_text|safe|linebreaks }} {% else %}
{{ item }}
{% endif %} {% endblock %} + +{% block scrollcontent %} + {% if item.get_text %} + {{ item.get_text|safe|linebreaks }} + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/openslides/application/templates/projector/Application.html b/openslides/application/templates/projector/Application.html index 5fbc094db..6e61b6b84 100644 --- a/openslides/application/templates/projector/Application.html +++ b/openslides/application/templates/projector/Application.html @@ -57,8 +57,11 @@ {% trans "Application" %} [{% trans "no number" %}] {% endif %} -

{{ application.title }}

{{ application.title }} +
+{% endblock %} + +{% block scrollcontent %}

{{ application.public_version.text|linebreaks }}
{% if application.public_version.reason %} diff --git a/openslides/assignment/templates/projector/Assignment.html b/openslides/assignment/templates/projector/Assignment.html index 1c434b0b3..49b831d95 100644 --- a/openslides/assignment/templates/projector/Assignment.html +++ b/openslides/assignment/templates/projector/Assignment.html @@ -24,7 +24,9 @@ {% endif %} +{% endblock %} +{% block scrollcontent %} {% if not assignment.profile.exists %}

{{ assignment.description|linebreaks }}
diff --git a/openslides/projector/static/javascript/projector.js b/openslides/projector/static/javascript/projector.js index 9c2611568..3a12018b5 100644 --- a/openslides/projector/static/javascript/projector.js +++ b/openslides/projector/static/javascript/projector.js @@ -8,14 +8,17 @@ function presentation_reload() { success: function(data) { $('#currentTime').removeClass('ajax_error'); $('#content').html(data.content); + $('#scrollcontent').html(data.scrollcontent); document.title = data.title; $('#currentTime').html(data.time); $('#content').clearQueue(); + // content font-size $('#content').animate({'font-size': data.bigger + '%'}, 200); - $('#content li').css({'font-size': data.bigger + '%'}, 200); - $('#content #sidebar').css({'font-size': '16px'}, 0); - $('#content').animate({'margin-top': data.up + 'em'}, 200); - + $('#content #sidebar').css({'font-size': '18px'}, 0); + $('#scrollcontent').animate({'font-size': data.bigger + '%'}, 200); + // content position + $('#scrollcontent').animate({'margin-top': data.up + 'em'}, 200); + // overlays $('#overlays div').remove(); $.each(data['overlays'], function (index, value){ $('#overlays').append('
' + value[1] + '
'); diff --git a/openslides/projector/static/styles/projector.css b/openslides/projector/static/styles/projector.css index 84bfc008e..1527bd958 100644 --- a/openslides/projector/static/styles/projector.css +++ b/openslides/projector/static/styles/projector.css @@ -1,14 +1,13 @@ /** - * OpenSlides projector Style + * OpenSlides projector style */ body{ margin : 0px; padding-top: 0px; padding-left : 0px; -/* font-family : Verdana,Futura, Geneva, Arial, Helvetica, sans-serif;*/ font-family: 'Lucida Grande',"Trebuchet MS",Verdana,sans-serif; - font-size : 18px; - background-color: #FAFAFB; + font-size : 20px; + background-color: #FAFAFB; } /*** HEADER ***/ @@ -83,13 +82,18 @@ body{ } /*** CONTENT ***/ -#content { +#contentwrapper { position:absolute; left:100px; top:150px; right:40px; z-index: -1; } +#scrollcontentcontainer { + position: relative; + margin-top: -11px; + overflow: hidden; +} .title { position: absolute; @@ -116,7 +120,6 @@ body{ text-transform: uppercase; } - /*** Items *** / /* item title centered */ .item_fullscreen @@ -124,7 +127,7 @@ body{ position: relative; top: 110px; right:30px; - font-size:40px; + font-size:230%; font-weight:bold; text-align: center; } @@ -132,7 +135,7 @@ body{ /* items in a list*/ .itemlist li { - font-size:26px; + font-size:130%; padding-bottom: 15px; list-style-type: none; } diff --git a/openslides/projector/templates/base-projector.html b/openslides/projector/templates/base-projector.html index 8e279bd50..c7b1b7bcd 100644 --- a/openslides/projector/templates/base-projector.html +++ b/openslides/projector/templates/base-projector.html @@ -37,9 +37,17 @@ -
- {% block content %} - {% endblock %} +
+
+ {% block content %} + {% endblock %} +
+
+
+ {% block scrollcontent %} + {% endblock %} +
+
diff --git a/openslides/projector/views.py b/openslides/projector/views.py index b3ecb1f24..1aa67cad3 100644 --- a/openslides/projector/views.py +++ b/openslides/projector/views.py @@ -108,6 +108,8 @@ class ActivateView(RedirectView): def get_ajax_context(self, **kwargs): context = super(ActivateView, self).get_ajax_context() + config['up'] = 0 + config['bigger'] = 100 return context @@ -146,8 +148,10 @@ def active_slide(request, sid=None): template_manipulation.send(sender='projector', request=request, context=data) if request.is_ajax(): content = render_block_to_string(data['template'], 'content', data) + scrollcontent = render_block_to_string(data['template'], 'scrollcontent', data) jsondata = { 'content': content, + 'scrollcontent': scrollcontent, 'overlays': data['overlays'], 'title': data['title'], 'time': datetime.now().strftime('%H:%M'), @@ -167,13 +171,14 @@ def active_slide(request, sid=None): @permission_required('agenda.can_manage_agenda') def projector_edit(request, direction): if direction == 'bigger': - config['bigger'] = int(config['bigger']) + 10 + config['bigger'] = int(config['bigger']) + 20 elif direction == 'smaller': - config['bigger'] = int(config['bigger']) - 10 + config['bigger'] = int(config['bigger']) - 20 elif direction == 'up': config['up'] = int(config['up']) - 10 elif direction == 'down': - config['up'] = int(config['up']) + 10 + if config['up'] < 0: + config['up'] = int(config['up']) + 10 elif direction == 'clean': config['up'] = 0 config['bigger'] = 100