|
Lines 42-54
function Focus$function_name(event) {
Link Here
|
| 42 |
} |
42 |
} |
| 43 |
|
43 |
|
| 44 |
function Click$function_name(event) { |
44 |
function Click$function_name(event) { |
| 45 |
set_to_today(event.data.id); |
45 |
set_to_today(event.data.id, 1); |
| 46 |
return false; // prevent page scroll |
46 |
return false; // prevent page scroll |
| 47 |
} |
47 |
} |
| 48 |
|
48 |
|
| 49 |
function set_to_today( id ) { |
49 |
function set_to_today( id, force ) { |
|
|
50 |
// The force parameter is used in Click but not in Focus ! |
| 50 |
if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; } |
51 |
if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; } |
| 51 |
if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' ) { |
52 |
if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' || force ) { |
| 52 |
\$("#" + id).val("$date"); |
53 |
\$("#" + id).val("$date"); |
| 53 |
} |
54 |
} |
| 54 |
} |
55 |
} |
| 55 |
- |
|
|