]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/layout/javascript_setup.js
Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[mfinanz.git] / templates / webpages / layout / javascript_setup.js
index dc516348ce2e68d81778278634604ddaaccd8424..2746ed73755502eb09c6725bcc0f101daf35d82f 100644 (file)
@@ -1,8 +1,9 @@
 [%- USE T8 %]
+[%- USE JSON %]
 $(function() {
 [% IF datefmt %]
-  setupPoints('[% MYCONFIG.numberformat %]', '[% 'wrongformat' | $T8 %]');
-  setupDateFormat('[% MYCONFIG.dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
+  setupPoints([% JSON.json(MYCONFIG.numberformat) %], '[% 'wrongformat' | $T8 %]');
+  setupDateFormat([% JSON.json(MYCONFIG.dateformat) %], '[% 'Falsches Datumsformat!' | $T8 %]');
 
   $.datepicker.setDefaults(
     $.extend({}, $.datepicker.regional["[% MYCONFIG.countrycode %]"], {
@@ -15,9 +16,7 @@ $(function() {
       buttonImageOnly: true
   }));
 
-  $('.datepicker').each(function() {
-    $(this).datepicker();
-  });
+  kivi.reinit_widgets();
 [% END %]
 
 [% IF ajax_spinner %]
@@ -29,8 +28,8 @@ $(function() {
 [% END %]
 });
 
-function fokus() {
 [%- IF focus -%]
+function fokus() {
   $('[% focus %]').focus();
-[%- END -%]
 }
+[%- END -%]