X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/d5fee534871e921008ede95b57877865a4933df7..9cd5c461ba9556b2da3db71303930b6e41aa1dba:/templates/webpages/layout/javascript_setup.js diff --git a/templates/webpages/layout/javascript_setup.js b/templates/webpages/layout/javascript_setup.js index 178bcb54e..3481502d5 100644 --- a/templates/webpages/layout/javascript_setup.js +++ b/templates/webpages/layout/javascript_setup.js @@ -1,13 +1,11 @@ -[%- USE T8 %] +[%- USE LxERP %] [%- 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 %]'); - $.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 +14,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() {