]> 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 bc4c5ef4e6c6a3dffdf67fed09fd74765f8cac4d..2746ed73755502eb09c6725bcc0f101daf35d82f 100644 (file)
@@ -1,9 +1,9 @@
 [%- USE T8 %]
+[%- USE JSON %]
 $(function() {
 [% IF datefmt %]
-  namespace("kivi").initLocale("[% MYCONFIG.countrycode | html %]");
-  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 %]"], {
@@ -16,9 +16,7 @@ $(function() {
       buttonImageOnly: true
   }));
 
-  $('.datepicker').each(function() {
-    $(this).datepicker();
-  });
+  kivi.reinit_widgets();
 [% END %]
 
 [% IF ajax_spinner %]
@@ -30,8 +28,8 @@ $(function() {
 [% END %]
 });
 
-function fokus() {
 [%- IF focus -%]
+function fokus() {
   $('[% focus %]').focus();
-[%- END -%]
 }
+[%- END -%]