Fix default-slide-preview-url

Fix #1246
This commit is contained in:
Oskar Hahn 2014-05-17 13:30:37 +02:00
parent 77c168f337
commit f0572551b3
3 changed files with 2 additions and 6 deletions

View File

@ -10,7 +10,7 @@
rel="tooltip" data-original-title="{% trans 'Show' %}">
<i class="icon-facetime-video {% if welcomepage_is_active %}icon-white{% endif %}"></i>
</a>&nbsp;
<a href="{% url 'projctor_preview_welcomepage' %}"
<a href="{% url 'projector_preview' callback='default' %}"
rel="tooltip" data-original-title="{% trans 'Preview' %}" class="btn btn-mini right">
<i class="icon-search"></i>
</a>

View File

@ -10,11 +10,6 @@ urlpatterns = patterns(
views.ProjectorView.as_view(),
name='projector_show'),
url(r'^preview/$',
views.ProjectorView.as_view(),
{'callback': None},
name='projctor_preview_welcomepage'),
url(r'^preview/(?P<callback>[^/]*)/$',
views.ProjectorView.as_view(),
name='projector_preview'),

View File

@ -50,6 +50,7 @@ class ActivateView(RedirectView):
def pre_redirect(self, request, *args, **kwargs):
if (kwargs['callback'] == 'mediafile' and
get_active_slide()['callback'] == 'mediafile'):
# TODO: find a way to do this in the mediafile-app
# If the current slide is a pdf and the new page is also a slide,
# we dont have to use set_active_slide, because is causes a content
# reload.