diff --git a/tailbone/static/css/mobile.css b/tailbone/static/css/mobile.css index e808a71b..cf4f9409 100644 --- a/tailbone/static/css/mobile.css +++ b/tailbone/static/css/mobile.css @@ -3,21 +3,29 @@ * Global styles for mobile templates ****************************************/ +/* main user menu button when root */ [data-role="header"] a.root-user, [data-role="header"] a.root-user:hover { background-color: red; } +/* become/stop root menu links */ #usermenu .root-user a { background-color: red; } +/* normal flash messages */ +.flash { + color: green; + margin-bottom: 1em; +} + +/* error flash messages */ +.error { + color: red; + margin-bottom: 1em; +} + .replacement-header { display: none; } - -/* used by login page */ -.error { - color: red; - margin-bottom: 1em; -} diff --git a/tailbone/static/js/tailbone.mobile.js b/tailbone/static/js/tailbone.mobile.js index f3b59da2..9852abba 100644 --- a/tailbone/static/js/tailbone.mobile.js +++ b/tailbone/static/js/tailbone.mobile.js @@ -36,6 +36,11 @@ $(document).on('pageshow', function() { if (el.is(':visible')) { el.focus(); } + + // TODO: seems like this should be better somehow... + // remove all flash messages after 2.5 seconds + window.setTimeout(function() { $('.flash, .error').remove(); }, 2500); + }); diff --git a/tailbone/templates/login.mako b/tailbone/templates/login.mako index bec67e91..d9191026 100644 --- a/tailbone/templates/login.mako +++ b/tailbone/templates/login.mako @@ -18,11 +18,6 @@ ${form.begin(**{'data-ajax': 'false'})} ${form.hidden('referrer', value=referrer)} - ## this is used by mobile view - % if error: -