Browse Source

Add django-bower and datepicker in comissao_form

pull/6/head
Eduardo Edson Batista Cordeiro Alves 10 years ago
parent
commit
4d6aa8124f
  1. 3
      .gitignore
  2. 19
      sapl/settings.py
  3. 24
      templates/base.html
  4. 13
      templates/comissoes/comissao_form.html

3
.gitignore

@ -72,3 +72,6 @@ target/
.vagrant .vagrant
static static
components
bower_components

19
sapl/settings.py

@ -58,6 +58,9 @@ INSTALLED_APPS = (
# zurb foundation # zurb foundation
'foundation', 'foundation',
'crispy_forms_foundation', 'crispy_forms_foundation',
# bower
'djangobower',
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
@ -131,3 +134,19 @@ DAB_FIELD_RENDERER = \
CRISPY_TEMPLATE_PACK = 'foundation-5' CRISPY_TEMPLATE_PACK = 'foundation-5'
CRISPY_FAIL_SILENTLY = not DEBUG CRISPY_FAIL_SILENTLY = not DEBUG
BOWER_COMPONENTS_ROOT = os.path.join(BASE_DIR, "bower_components")
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'djangobower.finders.BowerFinder',
)
BOWER_INSTALLED_APPS = (
'jquery#1.9',
'underscore',
'foundation-datepicker',
'components-font-awesome',
'foundation-icon-fonts',
)

24
templates/base.html

@ -4,16 +4,20 @@
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title> <title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block head_content %} {% block header_content %}
<link rel="stylesheet" href="{% static 'foundation/css/foundation.min.css' %}"> <link rel="stylesheet" href="{% static 'foundation/css/foundation.min.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/vendor/modernizr.js' %}"></script> <link rel="stylesheet" href="{% static 'foundation-datepicker/css/foundation-datepicker.min.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/vendor/jquery.js' %}"></script> <link rel="stylesheet" href="{% static 'components-font-awesome/css/font-awesome.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script> <link rel="stylesheet" href="{% static 'foundation-icon-fonts/font-awesome.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script> <script type="text/javascript" src="{% static 'foundation/js/vendor/modernizr.js' %}"></script>
{% endblock %} <script type="text/javascript" src="{% static 'foundation/js/vendor/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation-datepicker/js/foundation-datepicker.min.js' %}"></script>
{% endblock %}
</head> </head>
<body> <body>

13
templates/comissoes/comissao_form.html

@ -5,3 +5,16 @@
{% crispy form %} {% crispy form %}
{% endblock %} {% endblock %}
{% block foot_js %}
<script type="text/javascript">
$(function () {
$('.dateinput').fdatepicker({
// TODO localize
format: 'dd/mm/yyyy',
language: 'pt',
endDate: '31/12/2100',
todayBtn: true
});
});
</script>
{% endblock %}
Loading…
Cancel
Save