mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Make flash messages go away after 2 seconds.
This commit is contained in:
parent
065fe965a0
commit
402d756bf1
3 changed files with 44 additions and 30 deletions
|
@ -80,3 +80,10 @@ a {
|
|||
.negative{
|
||||
color: red;
|
||||
}
|
||||
|
||||
.flash{
|
||||
padding:8px;
|
||||
background-color: #ffc;
|
||||
font-weight: bold;
|
||||
font-size:15px;-moz-border-radius: 6px;-webkit-border-radius: 6px;
|
||||
}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block js %}
|
||||
$(document).ready(function(){
|
||||
|
||||
// display the form when clicking on the "add bill" button
|
||||
$('#add_bill_button').click(function(){
|
||||
$('#add_bill').show(200);
|
||||
|
@ -33,7 +31,6 @@ $(document).ready(function(){
|
|||
}, function(){
|
||||
$(this).children('a.remove').hide();
|
||||
});
|
||||
});
|
||||
{% endblock %}
|
||||
|
||||
{% block top_menu %}
|
||||
|
|
Loading…
Reference in a new issue