mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
wip: UI refactoring
* little CSS fix * Using a localized datepicker when possible see #204
This commit is contained in:
@@ -8,7 +8,7 @@ functionality into Postfix.
|
||||
"""
|
||||
from django.conf.urls.defaults import include
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.translation import ugettext as _, ugettext_lazy
|
||||
from django.utils.translation import ugettext as _, ugettext_lazy, get_language
|
||||
from modoboa.lib import events, parameters
|
||||
from modoboa.lib.webutils import static_url
|
||||
from models import *
|
||||
@@ -121,7 +121,7 @@ def get_static_content(user):
|
||||
|
||||
return """<script type="text/javascript">
|
||||
function arform_cb() {
|
||||
$('#id_untildate').datepicker({format: 'yyyy-mm-dd'});
|
||||
$('#id_untildate').datepicker({format: 'yyyy-mm-dd', language: '%s'});
|
||||
$(".submit").one('click', function(e) {
|
||||
simple_ajax_form_post(e, {
|
||||
error_cb: arform_cb,
|
||||
@@ -130,4 +130,4 @@ function arform_cb() {
|
||||
});
|
||||
}
|
||||
</script>
|
||||
"""
|
||||
""" % get_language()
|
||||
|
||||
@@ -54,7 +54,7 @@ $(document).ready(function() {
|
||||
<ul id="menu" class="nav nav-list">
|
||||
<li class="nav-header">{% trans "Filter sets" %}</li>
|
||||
<li>
|
||||
<select id="curfset" class="span2">
|
||||
<select id="curfset" class="span12">
|
||||
{% if active_script %}
|
||||
<option value="{{ active_script }}">{{ active_script }} ({% trans "active" %})</option>
|
||||
{% endif %}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<script src="{{ MEDIA_URL }}js/jquery.js" type="text/javascript"></script>
|
||||
<script src="{{ MEDIA_URL }}js/bootstrap.js" type="text/javascript"></script>
|
||||
<script src="{{ MEDIA_URL }}js/bootstrap-datepicker.js" type="text/javascript"></script>
|
||||
{% if LANGUAGE_CODE != "en" %}<script src="{{ MEDIA_URL }}js/locales/bootstrap-datepicker.{{ LANGUAGE_CODE }}.js" type="text/javascript"></script>{% endif %}
|
||||
<script src="{{ MEDIA_URL }}js/global.js" type="text/javascript"></script>
|
||||
<script src="{{ MEDIA_URL }}js/confirmation.js" type="text/javascript"></script>
|
||||
<script src="{{ MEDIA_URL }}js/notify.js" type="text/javascript"></script>
|
||||
|
||||
Reference in New Issue
Block a user