Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 36e2bf67

Von Sven Schöling vor etwa 7 Jahren hinzugefügt

  • ID 36e2bf671463dc06a6172735ae410d340bab78b0
  • Vorgänger f4b1ce59
  • Nachfolger 02438e2c

setupPoints und setupDateFormat entfernt

Unterschiede anzeigen:

js/common.js
1
function setupPoints(numberformat, wrongFormat) {
2
  decpoint = numberformat.substring((numberformat.substring(1, 2).match(/\.|\,|\'/) ? 5 : 4), (numberformat.substring(1, 2).match(/\.|\,|\'/) ? 6 : 5));
3
  if (numberformat.substring(1, 2).match(/\.|\,|\'/)) {
4
    thpoint = numberformat.substring(1, 2);
5
  }
6
  else {
7
    thpoint = null;
8
  }
9
  wrongNumberFormat = wrongFormat + " ( " + numberformat + " ) ";
10
}
11

  
12
function setupDateFormat(setDateFormat, setWrongDateFormat) {
13
  dateFormat = setDateFormat;
14
  wrongDateFormat = setWrongDateFormat + " ( " + setDateFormat + " ) ";
15
  formatArray = new Array();
16
  if(dateFormat.match(/^\w\w\W/)) {
17
    seperator = dateFormat.substring(2,3);
18
  }
19
  else {
20
    seperator = dateFormat.substring(4,5);
21
  }
22
}
23

  
24 1
function centerParms(width,height,extra) {
25 2
  xPos = (screen.width - width) / 2;
26 3
  yPos = (screen.height - height) / 2;
......
34 11
}
35 12

  
36 13
function check_right_number_format(input_name) {
14
  var decpoint = kivi._number_format.decimalSep;
15
  var thpoint  = kivi._number_format.thousandSep;
16

  
37 17
  var test_val = input_name.value;
38 18
  if(thpoint && thpoint == ','){
39 19
    test_val = test_val.replace(/,/g, '');
......
67 47
    return true;
68 48
  }
69 49

  
50
  var dateFormat = kivi.myconfig.dateformat;
51
  var seperator  = kivi._date_format.sep;
52

  
70 53
  if ( ( input_name.value.match(/^\d+$/ ) ) && !(dateFormat.lastIndexOf("y") == 3) ) {
71 54
    // date shortcuts for entering date without separator for three date styles, e.g.
72 55
    // 31122014 -> 12.04.2014
templates/webpages/layout/javascript_setup.js
3 3
[%- USE JSON %]
4 4
kivi.myconfig = [% JSON.json(MYCONFIG) %];
5 5
$(function() {
6
  setupPoints(kivi.myconfig.numberformat, '[% JavaScript.escape(LxERP.t8("wrongformat")) %]');
7
  setupDateFormat(kivi.myconfig.dateformat, '[% JavaScript.escape(LxERP.t8("Falsches Datumsformat!")) %]');
8

  
9 6
  $.datepicker.setDefaults(
10 7
    $.extend({}, $.datepicker.regional[kivi.myconfig.countrycode], {
11 8
      dateFormat: kivi.myconfig.dateformat.replace(/d+/gi, 'dd').replace(/m+/gi, 'mm').replace(/y+/gi, 'yy'),

Auch abrufbar als: Unified diff