]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/layout/javascript_setup.js
kivi.js: format/round/parse_amount, format/parse_date
[mfinanz.git] / templates / webpages / layout / javascript_setup.js
index 2746ed73755502eb09c6725bcc0f101daf35d82f..c8c9e81fcd2d35cbd9f8adce3a97e5464c5ca688 100644 (file)
@@ -1,9 +1,9 @@
 [%- USE T8 %]
 [%- USE T8 %]
-[%- USE JSON %]
+[%- USE JavaScript %]
 $(function() {
 [% IF datefmt %]
 $(function() {
 [% IF datefmt %]
-  setupPoints([% JSON.json(MYCONFIG.numberformat) %], '[% 'wrongformat' | $T8 %]');
-  setupDateFormat([% JSON.json(MYCONFIG.dateformat) %], '[% 'Falsches Datumsformat!' | $T8 %]');
+  setupPoints('[% JavaScript.escape(MYCONFIG.numberformat) %]', '[% 'wrongformat' | $T8 %]');
+  setupDateFormat('[% JavaScript.escape(MYCONFIG.dateformat) %]', '[% 'Falsches Datumsformat!' | $T8 %]');
 
   $.datepicker.setDefaults(
     $.extend({}, $.datepicker.regional["[% MYCONFIG.countrycode %]"], {
 
   $.datepicker.setDefaults(
     $.extend({}, $.datepicker.regional["[% MYCONFIG.countrycode %]"], {
@@ -16,6 +16,11 @@ $(function() {
       buttonImageOnly: true
   }));
 
       buttonImageOnly: true
   }));
 
+  kivi.setup_formats({
+    numbers: '[% JavaScript.escape(MYCONFIG.numberformat) %]',
+    dates:   '[% JavaScript.escape(MYCONFIG.dateformat) %]'
+  });
+
   kivi.reinit_widgets();
 [% END %]
 
   kivi.reinit_widgets();
 [% END %]