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
|
setupPoints und setupDateFormat entfernt