aboutsummaryrefslogtreecommitdiff
path: root/budget
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2012-09-03 11:43:29 -0700
committerAlexis Metaireau <alexis@notmyidea.org>2012-09-03 11:43:29 -0700
commit4f811ffc7209cd096d52001ee37d2555f4feaed2 (patch)
treeb80fd2cfc3c461b60a510e73464a7e26098cdb90 /budget
parent688a2814646988a536cc9ff693db17d8bc732a27 (diff)
parentd0129abc0edca656ae84419b9428a4212d9be00d (diff)
downloadihatemoney-mirror-4f811ffc7209cd096d52001ee37d2555f4feaed2.zip
ihatemoney-mirror-4f811ffc7209cd096d52001ee37d2555f4feaed2.tar.gz
ihatemoney-mirror-4f811ffc7209cd096d52001ee37d2555f4feaed2.tar.bz2
Merge pull request #90 from aavenel/master
Bugfix : display calendar widget when editing a bill
Diffstat (limited to 'budget')
-rw-r--r--budget/templates/add_bill.html9
-rw-r--r--budget/templates/layout.html10
-rw-r--r--budget/templates/list_bills.html7
3 files changed, 9 insertions, 17 deletions
diff --git a/budget/templates/add_bill.html b/budget/templates/add_bill.html
index 71bb6f0..595f363 100644
--- a/budget/templates/add_bill.html
+++ b/budget/templates/add_bill.html
@@ -1,16 +1,7 @@
{% extends "layout.html" %}
-{% block head %}
- <script src="{{ url_for("static", filename="js/jquery-ui.js") }}"></script>
- {% if g.lang != "en" %}
- <script src="{{ url_for("static", filename="js/i18n/jquery.ui.datepicker-%s.js" % g.lang ) }}"></script>
- {% endif %}
-{% endblock %}
{% block js %}
$('#cancel-form').click(function(){location.href={{ url_for(".list_bills") }};});
- $.datepicker.setDefaults({'dateFormat': 'yy-mm-dd'});
- $(".datepicker").datepicker($.datepicker.regional['{{ g.lang }}']);
-
{% endblock %}
diff --git a/budget/templates/layout.html b/budget/templates/layout.html
index 71ad5e8..8e6d3b2 100644
--- a/budget/templates/layout.html
+++ b/budget/templates/layout.html
@@ -8,6 +8,7 @@
<script src="{{ url_for("static", filename="js/jquery-1.7.2.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/ihatemoney.js") }}"></script>
<script src="{{ url_for("static", filename="js/bootstrap.min.js") }}"></script>
+ <script src="{{ url_for("static", filename="js/bootstrap-datepicker.js") }}"></script>
{% block head %}{% endblock %}
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
@@ -19,7 +20,14 @@
});
}, 4000);
- $('.dropdown-toggle').dropdown()
+ $('.datepicker').datepicker({
+ format: 'yyyy-mm-dd',
+ weekStart: 1,
+ autoclose: true,
+ language: '{{ g.lang }}'
+ });
+
+ $('.dropdown-toggle').dropdown();
{% block js %}{% endblock %}
});
diff --git a/budget/templates/list_bills.html b/budget/templates/list_bills.html
index b247fcc..89d05f6 100644
--- a/budget/templates/list_bills.html
+++ b/budget/templates/list_bills.html
@@ -34,13 +34,6 @@
$(this).find('.action').hide();
});
- $('.datepicker').datepicker({
- format: 'yyyy-mm-dd',
- weekStart: 1,
- autoclose: true,
- language: '{{ g.lang }}'
- });
-
var highlight_owers = function(){
var ower_ids = $(this).attr("owers").split(',');
var payer_id = $(this).attr("payer");