Added link to close all notifications with one click
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
float:right;
|
||||
margin-right:10px;
|
||||
}
|
||||
.message span.dismiss-all {
|
||||
padding:0 5px;
|
||||
cursor:pointer;
|
||||
float:right;
|
||||
margin-right:10px;
|
||||
}
|
||||
.message a {
|
||||
text-decoration:none;
|
||||
font-weight:bold
|
||||
@@ -41,6 +47,12 @@
|
||||
$(".dismiss").click(function(){
|
||||
$(this).parent().parent().fadeOut("slow"); return false;
|
||||
});
|
||||
$(".dismiss-all").click(function(){
|
||||
$(".message").each(function(){
|
||||
$(this).fadeOut("slow");
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('th input:checkbox').click(function(e) {
|
||||
var table = $(e.target).closest('table');
|
||||
$('td input:checkbox', table).attr('checked', e.target.checked);
|
||||
@@ -77,7 +89,11 @@
|
||||
<div class="flash">
|
||||
{% for message in messages %}
|
||||
<div class="message{% if message.tags %}{% if 'success' in message.tags %} notice{% endif %} {{ message.tags }}{% else %} notice{% endif %}" style="display: none;">
|
||||
<p>{{ message }}<span class="dismiss"><a title={% trans "dismiss this notification" %}>[{% trans "close" %}]</a></span></p>
|
||||
<p>
|
||||
{{ message }}
|
||||
<span class="dismiss-all"><a title={% trans "dismiss all notifications" %}>[{% trans "close all" %}]</a></span>
|
||||
<span class="dismiss"><a title={% trans "dismiss this notification" %}>[{% trans "close" %}]</a></span>
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user