X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=templates%2Fwebpages%2Flayout%2Fjavascript_setup.js;h=8deb9e9453cc83162d35dd8649888217c4cd96a8;hb=318d679b5f406db60eb41219cb742d1ae0683c3b;hp=2746ed73755502eb09c6725bcc0f101daf35d82f;hpb=38e2876fa8ab04fe1ee78aeaa415aa6e71c0f524;p=kivitendo-erp.git diff --git a/templates/webpages/layout/javascript_setup.js b/templates/webpages/layout/javascript_setup.js index 2746ed737..8deb9e945 100644 --- a/templates/webpages/layout/javascript_setup.js +++ b/templates/webpages/layout/javascript_setup.js @@ -1,13 +1,14 @@ -[%- USE T8 %] +[%- USE LxERP %] +[%- USE JavaScript %] [%- USE JSON %] +kivi.myconfig = [% JSON.json(MYCONFIG) %]; $(function() { -[% IF datefmt %] - setupPoints([% JSON.json(MYCONFIG.numberformat) %], '[% 'wrongformat' | $T8 %]'); - setupDateFormat([% JSON.json(MYCONFIG.dateformat) %], '[% 'Falsches Datumsformat!' | $T8 %]'); + setupPoints(kivi.myconfig.numberformat, '[% JavaScript.escape(LxERP.t8("wrongformat")) %]'); + setupDateFormat(kivi.myconfig.dateformat, '[% JavaScript.escape(LxERP.t8("Falsches Datumsformat!")) %]'); $.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, @@ -16,10 +17,14 @@ $(function() { buttonImageOnly: true })); + kivi.setup_formats({ + 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() {