X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Flayout%2Fjavascript_setup.js;h=2b03f4a2d8ab29f6260edd77788607d2c59c0018;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hp=7346ca3eebfad529ab46142d12637ab508ad568e;hpb=efb9a24f2252104ab4af5c25334119d7c5c70a8c;p=kivitendo-erp.git diff --git a/templates/webpages/layout/javascript_setup.js b/templates/webpages/layout/javascript_setup.js index 7346ca3ee..2b03f4a2d 100644 --- a/templates/webpages/layout/javascript_setup.js +++ b/templates/webpages/layout/javascript_setup.js @@ -1,12 +1,11 @@ -[%- USE T8 %] +[%- USE LxERP %] +[%- USE JavaScript %] +[%- USE JSON %] +kivi.myconfig = [% JSON.json(MYCONFIG) %]; $(function() { -[% IF datefmt %] - setupPoints('[% MYCONFIG.numberformat %]', '[% 'wrongformat' | $T8 %]'); - setupDateFormat('[% MYCONFIG.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]'); - $.datepicker.setDefaults( - $.extend({}, $.datepicker.regional["[% MYCONFIG.countrycode %]"], { - dateFormat: "[% 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, @@ -15,10 +14,15 @@ $(function() { buttonImageOnly: true })); + kivi.setup_formats({ + numbers: kivi.myconfig.numberformat, + dates: kivi.myconfig.dateformat, + times: kivi.myconfig.timeformat + }); + kivi.reinit_widgets(); -[% END %] -[% IF ajax_spinner %] +[%- IF ajax_spinner %] $(document).ajaxSend(function() { $('#ajax-spinner').show(); }).ajaxStop(function() {