#93: Show application number in header of projector template.

Some more projetor style work.
This commit is contained in:
Emanuel Schuetze 2012-04-24 22:27:16 +02:00
parent 7cd6c52471
commit 719ea6ec79
8 changed files with 55 additions and 25 deletions

View File

@ -1,5 +1,4 @@
<html><head> {% extends "base-projector.html" %}
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>{% extends "base-projector.html" %}
{% load i18n %} {% load i18n %}
@ -9,10 +8,12 @@
{% block content %} {% block content %}
<h1>{%trans "Agenda" %}</h1> <h1>{%trans "Agenda" %}</h1>
{% endblock %}
{% block scrollcontent %}
<ul class="itemlist"> <ul class="itemlist">
{% for item in items %} {% for item in items %}
<li{% if item.closed %} class="closed" {% endif %}>{{ item }} <li{% if item.closed %} class="closed" {% endif %}>{{ item }}</li>
{% endfor %} {% endfor %}
</li{%></ul> </ul>
{% endblock %} {% endblock %}
</body></html>

View File

@ -7,8 +7,13 @@
{% block content %} {% block content %}
{% if item.get_text %} {% if item.get_text %}
<h1>{{ item }}</h1> <h1>{{ item }}</h1>
{{ item.get_text|safe|linebreaks }}
{% else %} {% else %}
<div class="item_fullscreen">{{ item }}</div> <div class="item_fullscreen">{{ item }}</div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block scrollcontent %}
{% if item.get_text %}
<span>{{ item.get_text|safe|linebreaks }}</span>
{% endif %}
{% endblock %}

View File

@ -57,8 +57,11 @@
{% trans "Application" %} <i>[{% trans "no number" %}]</i> {% trans "Application" %} <i>[{% trans "no number" %}]</i>
{% endif %} {% endif %}
</h1> </h1>
<h2>{{ application.title }}</h2>
<b>{{ application.title }}</b> <b>{{ application.title }}</b>
<hr>
{% endblock %}
{% block scrollcontent %}
<p> <p>
<div class="text">{{ application.public_version.text|linebreaks }}</div> <div class="text">{{ application.public_version.text|linebreaks }}</div>
{% if application.public_version.reason %} {% if application.public_version.reason %}

View File

@ -24,7 +24,9 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% endblock %}
{% block scrollcontent %}
{% if not assignment.profile.exists %} {% if not assignment.profile.exists %}
<p> <p>
<div class="text">{{ assignment.description|linebreaks }}</div> <div class="text">{{ assignment.description|linebreaks }}</div>

View File

@ -8,14 +8,17 @@ function presentation_reload() {
success: function(data) { success: function(data) {
$('#currentTime').removeClass('ajax_error'); $('#currentTime').removeClass('ajax_error');
$('#content').html(data.content); $('#content').html(data.content);
$('#scrollcontent').html(data.scrollcontent);
document.title = data.title; document.title = data.title;
$('#currentTime').html(data.time); $('#currentTime').html(data.time);
$('#content').clearQueue(); $('#content').clearQueue();
// content font-size
$('#content').animate({'font-size': data.bigger + '%'}, 200); $('#content').animate({'font-size': data.bigger + '%'}, 200);
$('#content li').css({'font-size': data.bigger + '%'}, 200); $('#content #sidebar').css({'font-size': '18px'}, 0);
$('#content #sidebar').css({'font-size': '16px'}, 0); $('#scrollcontent').animate({'font-size': data.bigger + '%'}, 200);
$('#content').animate({'margin-top': data.up + 'em'}, 200); // content position
$('#scrollcontent').animate({'margin-top': data.up + 'em'}, 200);
// overlays
$('#overlays div').remove(); $('#overlays div').remove();
$.each(data['overlays'], function (index, value){ $.each(data['overlays'], function (index, value){
$('#overlays').append('<div id="overlay_' + value[0] + '">' + value[1] + '</div>'); $('#overlays').append('<div id="overlay_' + value[0] + '">' + value[1] + '</div>');

View File

@ -1,13 +1,12 @@
/** /**
* OpenSlides projector Style * OpenSlides projector style
*/ */
body{ body{
margin : 0px; margin : 0px;
padding-top: 0px; padding-top: 0px;
padding-left : 0px; padding-left : 0px;
/* font-family : Verdana,Futura, Geneva, Arial, Helvetica, sans-serif;*/
font-family: 'Lucida Grande',"Trebuchet MS",Verdana,sans-serif; font-family: 'Lucida Grande',"Trebuchet MS",Verdana,sans-serif;
font-size : 18px; font-size : 20px;
background-color: #FAFAFB; background-color: #FAFAFB;
} }
@ -83,13 +82,18 @@ body{
} }
/*** CONTENT ***/ /*** CONTENT ***/
#content { #contentwrapper {
position:absolute; position:absolute;
left:100px; left:100px;
top:150px; top:150px;
right:40px; right:40px;
z-index: -1; z-index: -1;
} }
#scrollcontentcontainer {
position: relative;
margin-top: -11px;
overflow: hidden;
}
.title .title
{ {
position: absolute; position: absolute;
@ -116,7 +120,6 @@ body{
text-transform: uppercase; text-transform: uppercase;
} }
/*** Items *** / /*** Items *** /
/* item title centered */ /* item title centered */
.item_fullscreen .item_fullscreen
@ -124,7 +127,7 @@ body{
position: relative; position: relative;
top: 110px; top: 110px;
right:30px; right:30px;
font-size:40px; font-size:230%;
font-weight:bold; font-weight:bold;
text-align: center; text-align: center;
} }
@ -132,7 +135,7 @@ body{
/* items in a list*/ /* items in a list*/
.itemlist li .itemlist li
{ {
font-size:26px; font-size:130%;
padding-bottom: 15px; padding-bottom: 15px;
list-style-type: none; list-style-type: none;
} }

View File

@ -37,9 +37,17 @@
</ul> </ul>
</div> </div>
<div id="contentwrapper">
<div id="content"> <div id="content">
{% block content %} {% block content %}
{% endblock %} {% endblock %}
</div> </div>
<div id="scrollcontentcontainer">
<div id="scrollcontent">
{% block scrollcontent %}
{% endblock %}
</div>
</div>
</div>
</body> </body>
</html> </html>

View File

@ -108,6 +108,8 @@ class ActivateView(RedirectView):
def get_ajax_context(self, **kwargs): def get_ajax_context(self, **kwargs):
context = super(ActivateView, self).get_ajax_context() context = super(ActivateView, self).get_ajax_context()
config['up'] = 0
config['bigger'] = 100
return context return context
@ -146,8 +148,10 @@ def active_slide(request, sid=None):
template_manipulation.send(sender='projector', request=request, context=data) template_manipulation.send(sender='projector', request=request, context=data)
if request.is_ajax(): if request.is_ajax():
content = render_block_to_string(data['template'], 'content', data) content = render_block_to_string(data['template'], 'content', data)
scrollcontent = render_block_to_string(data['template'], 'scrollcontent', data)
jsondata = { jsondata = {
'content': content, 'content': content,
'scrollcontent': scrollcontent,
'overlays': data['overlays'], 'overlays': data['overlays'],
'title': data['title'], 'title': data['title'],
'time': datetime.now().strftime('%H:%M'), 'time': datetime.now().strftime('%H:%M'),
@ -167,12 +171,13 @@ def active_slide(request, sid=None):
@permission_required('agenda.can_manage_agenda') @permission_required('agenda.can_manage_agenda')
def projector_edit(request, direction): def projector_edit(request, direction):
if direction == 'bigger': if direction == 'bigger':
config['bigger'] = int(config['bigger']) + 10 config['bigger'] = int(config['bigger']) + 20
elif direction == 'smaller': elif direction == 'smaller':
config['bigger'] = int(config['bigger']) - 10 config['bigger'] = int(config['bigger']) - 20
elif direction == 'up': elif direction == 'up':
config['up'] = int(config['up']) - 10 config['up'] = int(config['up']) - 10
elif direction == 'down': elif direction == 'down':
if config['up'] < 0:
config['up'] = int(config['up']) + 10 config['up'] = int(config['up']) + 10
elif direction == 'clean': elif direction == 'clean':
config['up'] = 0 config['up'] = 0