Monotone-Parent: 711c279a58aa75de77b9d32f31f1a6e01103ccd3
Monotone-Revision: 78b7a953d60bb703711ea8ff6a70c0514fdaf45a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-30T23:14:24 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
e5f7780963
commit
6982c02a8a
|
@ -19,14 +19,19 @@
|
||||||
02111-1307, USA.
|
02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// var cuicui = '';
|
||||||
|
|
||||||
function uixEarlierDate(date1, date2) {
|
function uixEarlierDate(date1, date2) {
|
||||||
// can this be done in a sane way?
|
// can this be done in a sane way?
|
||||||
|
// cuicui = 'year';
|
||||||
if (date1.getYear() < date2.getYear()) return date1;
|
if (date1.getYear() < date2.getYear()) return date1;
|
||||||
if (date1.getYear() > date2.getYear()) return date2;
|
if (date1.getYear() > date2.getYear()) return date2;
|
||||||
// same year
|
// same year
|
||||||
|
// cuicui += '/month';
|
||||||
if (date1.getMonth() < date2.getMonth()) return date1;
|
if (date1.getMonth() < date2.getMonth()) return date1;
|
||||||
if (date1.getMonth() > date2.getMonth()) return date2;
|
if (date1.getMonth() > date2.getMonth()) return date2;
|
||||||
// same month
|
// // same month
|
||||||
|
// cuicui += '/date';
|
||||||
if (date1.getDate() < date2.getDate()) return date1;
|
if (date1.getDate() < date2.getDate()) return date1;
|
||||||
if (date1.getDate() > date2.getDate()) return date2;
|
if (date1.getDate() > date2.getDate()) return date2;
|
||||||
// same day
|
// same day
|
||||||
|
@ -35,7 +40,7 @@ function uixEarlierDate(date1, date2) {
|
||||||
|
|
||||||
function validateAptEditor() {
|
function validateAptEditor() {
|
||||||
var e, startdate, enddate, tmpdate;
|
var e, startdate, enddate, tmpdate;
|
||||||
|
|
||||||
e = document.getElementById('summary');
|
e = document.getElementById('summary');
|
||||||
if (e.value.length == 0) {
|
if (e.value.length == 0) {
|
||||||
if (!confirm(labels.validate_notitle))
|
if (!confirm(labels.validate_notitle))
|
||||||
|
@ -47,7 +52,7 @@ function validateAptEditor() {
|
||||||
alert(labels.validate_invalid_startdate);
|
alert(labels.validate_invalid_startdate);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
startdate = calendar_startTime_date.prs_date(e.value);
|
startdate = e.calendar.prs_date(e.value);
|
||||||
if (startdate == null) {
|
if (startdate == null) {
|
||||||
alert(labels.validate_invalid_startdate);
|
alert(labels.validate_invalid_startdate);
|
||||||
return false;
|
return false;
|
||||||
|
@ -58,14 +63,15 @@ function validateAptEditor() {
|
||||||
alert(labels.validate_invalid_enddate);
|
alert(labels.validate_invalid_enddate);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
enddate = calendar_endTime_date.prs_date(e.value);
|
enddate = e.calendar.prs_date(e.value);
|
||||||
if (enddate == null) {
|
if (enddate == null) {
|
||||||
alert(labels.validate_invalid_enddate);
|
alert(labels.validate_invalid_enddate);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// cuicui = '';
|
||||||
tmpdate = uixEarlierDate(startdate, enddate);
|
tmpdate = uixEarlierDate(startdate, enddate);
|
||||||
if (tmpdate == enddate) {
|
if (tmpdate == enddate) {
|
||||||
|
// window.alert(cuicui);
|
||||||
alert(labels.validate_endbeforestart);
|
alert(labels.validate_endbeforestart);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -76,6 +82,7 @@ function validateAptEditor() {
|
||||||
start = document.forms[0]['startTime_time_hour'].value;
|
start = document.forms[0]['startTime_time_hour'].value;
|
||||||
end = document.forms[0]['endTime_time_hour'].value;
|
end = document.forms[0]['endTime_time_hour'].value;
|
||||||
if (start > end) {
|
if (start > end) {
|
||||||
|
window.alert("coucou1");
|
||||||
alert(labels.validate_endbeforestart);
|
alert(labels.validate_endbeforestart);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +90,7 @@ function validateAptEditor() {
|
||||||
start = document.forms[0]['startTime_time_minute'].value;
|
start = document.forms[0]['startTime_time_minute'].value;
|
||||||
end = document.forms[0]['endTime_time_minute'].value;
|
end = document.forms[0]['endTime_time_minute'].value;
|
||||||
if (start > end) {
|
if (start > end) {
|
||||||
|
window.alert("coucou2");
|
||||||
alert(labels.validate_endbeforestart);
|
alert(labels.validate_endbeforestart);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -97,9 +105,43 @@ function submitMeeting(thisForm) {
|
||||||
action.setAttribute("name", "save:method");
|
action.setAttribute("name", "save:method");
|
||||||
action.setAttribute("value", "save");
|
action.setAttribute("value", "save");
|
||||||
|
|
||||||
thisForm.submit();
|
if (validateAptEditor()) {
|
||||||
|
thisForm.submit();
|
||||||
window.opener.setTimeout('refreshAppointments();', 200);
|
window.opener.setTimeout('refreshAppointments();', 200);
|
||||||
|
window.close();
|
||||||
window.close();
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleDetails() {
|
||||||
|
var div = $("details");
|
||||||
|
|
||||||
|
var buttonsDiv = $("buttons");
|
||||||
|
var wHeight = 0;
|
||||||
|
if (!window._fullHeight) {
|
||||||
|
var minHeight = (document.getElementsByTagName("div")[0].clientHeight
|
||||||
|
+ 2 * buttonsDiv.clientHeight);
|
||||||
|
window._fullHeight = minHeight + div.clientHeight;
|
||||||
|
window._hiddenHeight = minHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (div.style.visibility) {
|
||||||
|
div.style.visibility = null;
|
||||||
|
buttonsDiv.top = (window._hiddenHeight + buttonsDiv.clientHeight) + 'px;';
|
||||||
|
window.resizeTo(document.body.clientWidth, window._hiddenHeight);
|
||||||
|
$("detailsButton").innerHTML = labels["Show Details"];
|
||||||
|
} else {
|
||||||
|
div.style.visibility = 'visible;';
|
||||||
|
buttonsDiv.top = null;
|
||||||
|
window.resizeTo(document.body.clientWidth, window._fullHeight);
|
||||||
|
$("detailsButton").innerHTML = labels["Hide Details"];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleCycleVisibility(node, className, hiddenValue) {
|
||||||
|
var containers = document.getElementsByClassName(className);
|
||||||
|
var newVisibility = ((node.value == hiddenValue) ? null : 'visible;');
|
||||||
|
for (var i = 0; i < containers.length; i++)
|
||||||
|
containers[i].style.visibility = newVisibility;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue