diff --git a/openslides/agenda/signals.py b/openslides/agenda/signals.py index 718028269..457a59d9d 100644 --- a/openslides/agenda/signals.py +++ b/openslides/agenda/signals.py @@ -38,7 +38,8 @@ def setup_agenda_config_page(sender, **kwargs): extra_stylefiles = ['styles/timepicker.css', 'styles/jquery-ui/jquery-ui.custom.min.css'] extra_javascript = ['javascript/jquery-ui.custom.min.js', 'javascript/jquery-ui-timepicker-addon.min.js', - 'javascript/jquery-ui-sliderAccess.min.js'] + 'javascript/jquery-ui-sliderAccess.min.js', + 'javascript/agenda-config-datepicker.js'] return ConfigPage(title=ugettext_noop('Agenda'), url='agenda', diff --git a/openslides/agenda/static/javascript/agenda-config-datepicker.js b/openslides/agenda/static/javascript/agenda-config-datepicker.js new file mode 100644 index 000000000..d226e1c5f --- /dev/null +++ b/openslides/agenda/static/javascript/agenda-config-datepicker.js @@ -0,0 +1,52 @@ +/** + * OpenSlides agenda config functions for the datepicker + * + * :copyright: 2011–2013 by OpenSlides team, see AUTHORS. + * :license: GNU GPL, see LICENSE for more details. + */ + +$(function() { + $.datepicker.regional[gettext('en')] = { + prevText: gettext('previous month'), + nextText: gettext('next month'), + monthNames: [ + gettext('January'), gettext('February'), gettext('March'), + gettext('April'), gettext('May'), gettext('June'), + gettext('July'), gettext('August'), gettext('September'), + gettext('October'), gettext('November'), gettext('December') + ], + monthNamesShort: [ + gettext('Jan'), gettext('Feb'), gettext('Mar'), + gettext('Apr'), gettext('May'), gettext('Jun'), + gettext('Jul'), gettext('Aug'), gettext('Sep'), + gettext('Oct'), gettext('Nov'), gettext('Dec') + ], + dayNames: [ + gettext('Sunday'), gettext('Monday'), gettext('Tuesdey'), gettext('Wednesday'), + gettext('Thursday'), gettext('Friday'), gettext('Saturday') + ], + dayNamesMin: [ + gettext('Su'), gettext('Mo'), gettext('Tu'), gettext('We'), + gettext('Th'), gettext('Fr'), gettext('Sa') + ], + dayNamesShort: [ + gettext('Su'), gettext('Mo'), gettext('Tu'), gettext('We'), + gettext('Th'), gettext('Fr'), gettext('Sa') + ], + dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false + }; + + $.datepicker.setDefaults($.datepicker.regional[gettext('en')]); + + $("#id_agenda_start_event_date_time").datetimepicker ( + { + hour: 12, + timeFormat: 'HH:mm', + timeText: gettext('Time'), + hourText: gettext('Hour'), + minuteText: gettext('Minute'), + currentText: gettext('Current time'), + closeText: gettext('Close') + } + ); +}); diff --git a/openslides/config/templates/config/config_form.html b/openslides/config/templates/config/config_form.html index 33341e580..75291cf54 100644 --- a/openslides/config/templates/config/config_form.html +++ b/openslides/config/templates/config/config_form.html @@ -2,60 +2,8 @@ {% load i18n %} -{% get_current_language as LANGUAGE_CODE %} {% load staticfiles %} -{% block javascript %} - {{ block.super }} - -{% endblock %} - {% block content %}