Improved Web interface to handle calendars tags

Monotone-Parent: 6eda087f6dba9f0f98b63f259880cf2d343835d5
Monotone-Revision: 54b80d62e3c706aa43398f889ab394e00c6fa08e

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-08-18T01:03:05
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-08-18 01:03:05 +00:00
parent ee2ebd206d
commit e7eb160782
21 changed files with 362 additions and 96 deletions
+32 -3
View File
@@ -21,10 +21,39 @@ function onOKClick(event) {
var calendarName = $("calendarName");
var calendarColor = $("calendarColor");
var calendarID = $("calendarID");
var save = true;
var tag = $("calendarSyncTag").value;
var originalTag = $("originalCalendarSyncTag");
var allTags = $("allCalendarSyncTags");
window.opener.updateCalendarProperties(calendarID.value,
calendarName.value,
calendarColor.value);
if (allTags)
allTags = allTags.value.split(",");
if ($("synchronizeCalendar").checked) {
if (tag.blank()) {
alert(labels["tagNotDefined"]);
save = false;
}
else if (allTags
&& allTags.indexOf(tag) > -1) {
alert(labels["tagAlreadyExists"]);
save = false;
}
else if (originalTag
&& !originalTag.value.blank()
&& tag != originalTag.value)
save = confirm(labels["tagHasChanged"]);
}
else if (originalTag
&& !originalTag.value.blank())
save = confirm(labels["tagWasRemoved"]);
if (save)
window.opener.updateCalendarProperties(calendarID.value,
calendarName.value,
calendarColor.value);
else
Event.stop(event);
}
function onColorClick(event) {