]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/layout/javascript_setup.js
mehr JavaScript-escapen
[mfinanz.git] / templates / webpages / layout / javascript_setup.js
index 8a060425e6af4561d0e1683ba651f41462c1ca90..40424452b5485d2cb7f2f68bcae21f2733229645 100644 (file)
@@ -1,12 +1,13 @@
 [%- USE T8 %]
+[%- USE JavaScript %]
 $(function() {
 [% IF datefmt %]
-  setupPoints('[% MYCONFIG.numberformat %]', '[% 'wrongformat' | $T8 %]');
-  setupDateFormat('[% 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 %]"], {
-      dateFormat: "[% datefmt %]",
+    $.extend({}, $.datepicker.regional['[% JavaScript.escape(MYCONFIG.countrycode) %]'], {
+      dateFormat: '[% JavaScript.escape(datefmt) %]',
       showOn: "button",
       showButtonPanel: true,
       changeMonth: true,
@@ -15,6 +16,11 @@ $(function() {
       buttonImageOnly: true
   }));
 
+  kivi.setup_formats({
+    numbers: '[% JavaScript.escape(MYCONFIG.numberformat) %]',
+    dates:   '[% JavaScript.escape(MYCONFIG.dateformat) %]'
+  });
+
   kivi.reinit_widgets();
 [% END %]
 
@@ -27,8 +33,8 @@ $(function() {
 [% END %]
 });
 
-function fokus() {
 [%- IF focus -%]
+function fokus() {
   $('[% focus %]').focus();
-[%- END -%]
 }
+[%- END -%]