X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/efb9a24f2252104ab4af5c25334119d7c5c70a8c..9cd5c461ba9556b2da3db71303930b6e41aa1dba:/templates/webpages/layout/javascript_setup.js diff --git a/templates/webpages/layout/javascript_setup.js b/templates/webpages/layout/javascript_setup.js index 7346ca3ee..3481502d5 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,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() {