Don't reset clock when moving in calendar.

This commit is contained in:
Michal Čihař
2004-04-27 08:59:59 +00:00
parent 1a42b4a85a
commit 249096945d
3 changed files with 20 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ var year;
var hour;
var minute;
var second;
var clock_set = 0;
/**
* Opens calendar window.
@@ -272,16 +273,28 @@ function initCalendar() {
str += "</tr></table>";
cnt.innerHTML = str;
// Should we handle time also?
if (window.opener.dateType != 'date') {
if (window.opener.dateType != 'date' && !clock_set) {
if (document.getElementById) {
cnt = document.getElementById("clock_data");
} else if (document.all) {
cnt = document.all["clock_data"];
}
str = '';
str += '<form class="clock">';
str += '<input id="hour" type="text" size="2" maxlength="2" value="' + formatNum2(hour) + '" />:';
str += '<input id="minute" type="text" size="2" maxlength="2" value="' + formatNum2(minute) + '" />:';
str += '<input id="second" type="text" size="2" maxlength="2" value="' + formatNum2(second) + '" />';
str += '</form>';
cnt.innerHTML = str;
clock_set = 1;
}
cnt.innerHTML = str;
}
/**