Revision 4ec753d2
Von Sven Schöling vor etwa 10 Jahren hinzugefügt
templates/webpages/layout/javascript_setup.js | ||
---|---|---|
[%- USE T8 %]
|
||
[%- USE JavaScript %]
|
||
[%- USE JSON %]
|
||
kivi.myconfig = [% JSON.json(MYCONFIG) %];
|
||
$(function() {
|
||
[% IF datefmt %]
|
||
setupPoints('[% JavaScript.escape(MYCONFIG.numberformat) %]', '[% 'wrongformat' | $T8 %]');
|
||
setupDateFormat('[% JavaScript.escape(MYCONFIG.dateformat) %]', '[% 'Falsches Datumsformat!' | $T8 %]');
|
||
setupPoints(kivi.myconfig.numberformat, '[% 'wrongformat' | $T8 %]');
|
||
setupDateFormat(kivi.myconfig.dateformat, '[% 'Falsches Datumsformat!' | $T8 %]');
|
||
|
||
$.datepicker.setDefaults(
|
||
$.extend({}, $.datepicker.regional['[% JavaScript.escape(MYCONFIG.countrycode) %]'], {
|
||
dateFormat: '[% JavaScript.escape(datefmt) %]',
|
||
$.extend({}, $.datepicker.regional[kivi.myconfig.countrycode], {
|
||
dateFormat: kivi.myconfig.dateformat.replace(/d+/gi, 'dd').replace(/m+/gi, 'mm').replace(/y+/gi, 'yy'),
|
||
showOn: "button",
|
||
showButtonPanel: true,
|
||
changeMonth: true,
|
||
... | ... | |
}));
|
||
|
||
kivi.setup_formats({
|
||
numbers: '[% JavaScript.escape(MYCONFIG.numberformat) %]',
|
||
dates: '[% JavaScript.escape(MYCONFIG.dateformat) %]'
|
||
numbers: kivi.myconfig.numberformat,
|
||
dates: kivi.myconfig.dateformat
|
||
});
|
||
|
||
kivi.reinit_widgets();
|
||
[% END %]
|
||
|
||
[% IF ajax_spinner %]
|
||
[%- IF ajax_spinner %]
|
||
$(document).ajaxSend(function() {
|
||
$('#ajax-spinner').show();
|
||
}).ajaxStop(function() {
|
Auch abrufbar als: Unified diff
%::myconfig dem Client javascript zur Verfügung stellen.