beamer clean link

This commit is contained in:
Oskar Hahn 2011-09-08 09:23:21 +02:00
parent 1f5d86a0fc
commit 508be2f4eb
3 changed files with 6 additions and 1 deletions

View File

@ -49,7 +49,7 @@
{% trans "Adjust projector view" %}:
<a class="beamer_edit" href="{% url beamer_bigger %}"><img src="/static/images/icons/zoom-in.png"></a> <a class="beamer_edit" href="{% url beamer_smaller %}"><img src="/static/images/icons/zoom-out.png"></a>
<a class="beamer_edit" href="{% url beamer_up %}"><img src="/static/images/icons/go-up.png"></a> <a class="beamer_edit" href="{% url beamer_down %}"><img src="/static/images/icons/go-down.png"></a>
{# <a href="{% url item_activate 0 %}"><img src="/static/images/icons/view-restore.png"></a> #}
<a class="beamer_edit" href="{% url beamer_clean %}"><img src="/static/images/icons/view-restore.png"></a>
</div>
{% endif %}
<table id="menu-overview" class="agendatable">

View File

@ -64,4 +64,6 @@ urlpatterns = patterns('agenda.views',
url(r'^beamer/up$', 'beamer_edit', {'direction': 'up'}, name='beamer_up'),
url(r'^beamer/down$', 'beamer_edit', {'direction': 'down'}, name='beamer_down'),
url(r'^beamer/clean$', 'beamer_edit', {'direction': 'clean'}, name='beamer_clean'),
)

View File

@ -100,6 +100,9 @@ def beamer_edit(request, direction):
config_set('up', int(config_get('up', 0)) - 10)
elif direction == 'down':
config_set('up', int(config_get('up', 0)) + 10)
elif direction == 'clean':
config_set('up', 0)
config_set('bigger', 100)
if request.is_ajax():
return ajax_request({})