From e821b2a025d0c2c97645c06e1e48de340773cdd9 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 29 Jan 2018 22:47:30 -0600 Subject: [PATCH] Always redirect to mobile home page, if "other" page is refreshed also applies when becoming / stopping root, and maybe other cases? --- tailbone/templates/mobile/base.mako | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tailbone/templates/mobile/base.mako b/tailbone/templates/mobile/base.mako index 29a217bb..75d8c0e0 100644 --- a/tailbone/templates/mobile/base.mako +++ b/tailbone/templates/mobile/base.mako @@ -11,6 +11,16 @@ ${h.javascript_link(request.static_url('tailbone:static/js/jquery.ui.tailbone.mobile.js'))} ${h.javascript_link(request.static_url('tailbone:static/js/tailbone.mobile.js'))} ${self.extra_javascript()} + + ## since jquery mobile will "utterly cache" the first page which is loaded + ## by the client, we must make sure that is always the home page. so if + ## user tries to e.g. "refresh" some other page, redirect to home page + % if request.matched_route.name != 'mobile.home': + + % endif + % if request.rattail_config.getbool('tailbone', 'mobile.flash.autodismiss', default=True):