Fix misplaced datepicker configuration (#258)

Bootstrap-datepicker is only included in the
list_bills template but its configuration was
living in the layout template, leading to a
javascript error on every page except list_bills.

Fixes #256
This commit is contained in:
0livd 2017-08-20 12:22:47 +02:00 committed by Alexis Metaireau
parent 75104d9c19
commit a0d4917ac4
2 changed files with 7 additions and 7 deletions

View file

@ -21,13 +21,6 @@
}); });
}, 4000); }, 4000);
$('.datepicker').datepicker({
format: 'yyyy-mm-dd',
weekStart: 1,
autoclose: true,
language: '{{ g.lang }}'
});
$('.dropdown-toggle').dropdown(); $('.dropdown-toggle').dropdown();
{% block js %}{% endblock %} {% block js %}{% endblock %}

View file

@ -8,6 +8,13 @@
{% block js %} {% block js %}
{% if add_bill %} $('#new-bill').click(); {% endif %} {% if add_bill %} $('#new-bill').click(); {% endif %}
$('.datepicker').datepicker({
format: 'yyyy-mm-dd',
weekStart: 1,
autoclose: true,
language: '{{ g.lang }}'
});
// Hide all members actions // Hide all members actions
$('.action').each(function(){ $('.action').each(function(){
$(this).hide(); $(this).hide();