agenda: right cookies deleted when leaving the page

This commit is contained in:
Serghei Mihai 2014-04-02 11:50:13 +02:00
parent d6645027e2
commit 23bca0c985
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ class ServiceViewMixin(object):
service = None
date = None
popup = False
cookies_to_clear = [('agenda-worker-tabs', ), ('active-resource-agenda', )]
cookies_to_clear = [('agenda-tabs', ), ('active-agenda', ), ('last-ressource', )]
def clear_cookies(self, response, path):
for cookie in self.cookies_to_clear:

View File

@ -26,11 +26,11 @@ def redirect_to_homepage(request):
class Homepage(TemplateView):
template_name='calebasse/homepage.html'
cookies_to_clear = [('agenda-worker-tabs', )]
cookies_to_clear = [('agenda-tabs', )]
def dispatch(self, request, **kwargs):
if 'service' in kwargs:
self.cookies_to_clear = [('agenda-worker-tabs',
self.cookies_to_clear = [('agenda-tabs',
'/%s/agenda' % kwargs['service']),
('agenda-ressource-tabs',
'/%s/agenda' % kwargs['service']),