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

View File

@ -7,8 +7,13 @@
{% block content %}
{% if item.get_text %}
<h1>{{ item }}</h1>
{{ item.get_text|safe|linebreaks }}
{% else %}
<div class="item_fullscreen">{{ item }}</div>
{% endif %}
{% 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>
{% endif %}
</h1>
<h2>{{ application.title }}</h2>
<b>{{ application.title }}</b>
<hr>
{% endblock %}
{% block scrollcontent %}
<p>
<div class="text">{{ application.public_version.text|linebreaks }}</div>
{% if application.public_version.reason %}

View File

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

View File

@ -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('<div id="overlay_' + value[0] + '">' + value[1] + '</div>');

View File

@ -1,13 +1,12 @@
/**
* 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;
font-size : 20px;
background-color: #FAFAFB;
}
@ -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;
}

View File

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

View File

@ -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,12 +171,13 @@ 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':
if config['up'] < 0:
config['up'] = int(config['up']) + 10
elif direction == 'clean':
config['up'] = 0