]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/layout/javascript_setup.js
Javascript escaping: Nochmal mit JavaScript Plugin
[mfinanz.git] / templates / webpages / layout / javascript_setup.js
index 8a060425e6af4561d0e1683ba651f41462c1ca90..178bcb54e37cd2dea187f291abc837b9a31d5d4a 100644 (file)
@@ -1,8 +1,9 @@
 [%- USE T8 %]
 [%- USE T8 %]
+[%- USE JavaScript %]
 $(function() {
 [% IF datefmt %]
 $(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 %]"], {
 
   $.datepicker.setDefaults(
     $.extend({}, $.datepicker.regional["[% MYCONFIG.countrycode %]"], {
@@ -27,8 +28,8 @@ $(function() {
 [% END %]
 });
 
 [% END %]
 });
 
-function fokus() {
 [%- IF focus -%]
 [%- IF focus -%]
+function fokus() {
   $('[% focus %]').focus();
   $('[% focus %]').focus();
-[%- END -%]
 }
 }
+[%- END -%]