slideUp read messages

This commit is contained in:
Oskar Hahn 2012-04-17 14:45:25 +02:00
parent 56f1a15cac
commit 0a8d40e2ac
3 changed files with 5 additions and 3 deletions

View File

@ -23,6 +23,7 @@
<p>{%trans "Results of" %} {{ ballot }}. {%trans "Vote" %}</p> <p>{%trans "Results of" %} {{ ballot }}. {%trans "Vote" %}</p>
<i>-1 := {% trans 'majority' %}, -2 := {% trans 'undocumented' %}</i> <i>-1 := {% trans 'majority' %}, -2 := {% trans 'undocumented' %}</i>
<form action="" method="post" class="small-form">{% csrf_token %} <form action="" method="post" class="small-form">{% csrf_token %}
{{ pre_form }}
<span id="poll_id" style="display:none">{{ poll.id }}</span> <span id="poll_id" style="display:none">{{ poll.id }}</span>
<table class="table" style="width: auto;"> <table class="table" style="width: auto;">
<tr> <tr>

View File

@ -14,7 +14,8 @@ $(function () {
function new_message(text, type) { function new_message(text, type) {
message = $('#dummy-notification').clone(true); var message = $('#dummy-notification').clone(true);
$(message).show().addClass(type).children('em').html(text); $(message).removeAttr('id').addClass(type).children('em').html(text);
$('#notifications').append(message); $('#notifications').append(message);
message.slideDown('fast');
} }

View File

@ -67,7 +67,7 @@
{% endfor %} {% endfor %}
<script> <script>
$("div.notification").click(function () { $("div.notification").click(function () {
$(this).hide("fast"); $(this).slideUp("fast");
}); });
</script> </script>
</div> </div>