1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Ease "Add a bill" form occurrence with slideUp/slideDown effects. Related to #53.

This commit is contained in:
Arnaud Bos 2011-11-02 13:20:00 +01:00
parent f3972db96a
commit ac2935b429

View file

@ -16,15 +16,17 @@
// display the form when clicking on the "add bill" button // display the form when clicking on the "add bill" button
var show_form = function(){ var show_form = function(){
$('#bill-form').show(70); $('#bill-form').slideDown(1000);
$("#hide-bill-form").show();
$("#new-bill").hide(); $("#new-bill").hide();
return false; return false;
} }
// and provide a mechanism to hide it back // and provide a mechanism to hide it back
var hide_form = function(){ var hide_form = function(){
$("#bill-form").hide(70); $("#bill-form").slideUp(1000);
$("#new-bill").show(); $("#new-bill").show();
$("#hide-bill-form").hide();
return false; return false;
} }
@ -138,7 +140,7 @@
<a id="new-bill" href="{{ url_for(".add_bill") }}" class="btn primary">{{ _("Add a new bill") }}</a> <a id="new-bill" href="{{ url_for(".add_bill") }}" class="btn primary">{{ _("Add a new bill") }}</a>
<form id="bill-form" action="{{ url_for(".add_bill") }}" method="post" style="display: none"> <form id="bill-form" action="{{ url_for(".add_bill") }}" method="post" style="display: none">
<a id="hide-bill-form" href="#">{{ _("hide this form") }}</a> <a class="btn primary" id="hide-bill-form" href="#">{{ _("hide this form") }}</a>
{{ forms.add_bill(bill_form) }} {{ forms.add_bill(bill_form) }}
</form> </form>