aboutsummaryrefslogtreecommitdiff
path: root/budget/templates/layout.html
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-08-10 23:55:07 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2011-08-10 23:55:07 +0200
commit402d756bf1e54236164643f2484e8fa9c78dc6d8 (patch)
treebc23a3c97194eb5a729717f180de3a14f3566678 /budget/templates/layout.html
parent065fe965a00b48706f2066bc32a84b0c29ff1962 (diff)
downloadihatemoney-mirror-402d756bf1e54236164643f2484e8fa9c78dc6d8.zip
ihatemoney-mirror-402d756bf1e54236164643f2484e8fa9c78dc6d8.tar.gz
ihatemoney-mirror-402d756bf1e54236164643f2484e8fa9c78dc6d8.tar.bz2
Make flash messages go away after 2 seconds.
Diffstat (limited to 'budget/templates/layout.html')
-rw-r--r--budget/templates/layout.html14
1 files changed, 12 insertions, 2 deletions
diff --git a/budget/templates/layout.html b/budget/templates/layout.html
index 9036de3..3ab6f1f 100644
--- a/budget/templates/layout.html
+++ b/budget/templates/layout.html
@@ -5,7 +5,17 @@
<title>Account manager</title>
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='main.css') }}">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
-<script type="text/javascript" charset="utf-8">{% block js %}{% endblock %}</script>
+<script type="text/javascript" charset="utf-8">
+$(document).ready(function(){
+ setTimeout(function(){
+ $(".flash").fadeOut("slow", function () {
+ $(".flash").remove();
+ });
+ }, 2000);
+
+ {% block js %}{% endblock %}
+});
+</script>
</head>
<body>
@@ -17,7 +27,7 @@
</div>
<hr>
{% for message in get_flashed_messages() %}
- <div class=info>{{ message }}</div>
+ <div class="flash">{{ message }}</div>
{% endfor %}
{% block content %}
{% endblock %}