2008-08-28 16:48:45 +02:00
|
|
|
/* -*- Mode: java; tab-width: 2; c-tab-always-indent: t; indent-tabs-mode: t; c-basic-offset: 2 -*- */
|
|
|
|
|
2008-07-17 23:12:43 +02:00
|
|
|
function onCancelButtonClick(event) {
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function onThisButtonClick(event) {
|
|
|
|
if (action == 'edit')
|
|
|
|
window.opener.performEventEdition(calendarFolder, componentName,
|
2008-08-28 16:48:45 +02:00
|
|
|
recurrenceName);
|
2008-07-17 23:12:43 +02:00
|
|
|
else if (action == 'delete')
|
|
|
|
window.opener.performEventDeletion(calendarFolder, componentName,
|
2008-08-28 16:48:45 +02:00
|
|
|
recurrenceName);
|
2008-07-17 23:12:43 +02:00
|
|
|
else
|
|
|
|
window.alert("Invalid action: " + action);
|
|
|
|
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function onAllButtonClick(event) {
|
|
|
|
if (action == 'edit')
|
|
|
|
window.opener.performEventEdition(calendarFolder, componentName);
|
|
|
|
else if (action == 'delete')
|
|
|
|
window.opener.performEventDeletion(calendarFolder, componentName);
|
|
|
|
else
|
|
|
|
window.alert("Invalid action: " + action);
|
|
|
|
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function onOccurenceDialogLoad() {
|
|
|
|
var thisButton = $("thisButton");
|
|
|
|
thisButton.observe("click", onThisButtonClick);
|
|
|
|
|
|
|
|
var allButton = $("allButton");
|
|
|
|
allButton.observe("click", onAllButtonClick);
|
|
|
|
|
|
|
|
var cancelButton = $("cancelButton");
|
|
|
|
cancelButton.observe("click", onCancelButtonClick);
|
|
|
|
}
|
|
|
|
|
|
|
|
FastInit.addOnLoad(onOccurenceDialogLoad);
|