2009-07-19 18:41:42 +02:00
|
|
|
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2008-08-28 16:48:45 +02:00
|
|
|
|
2008-07-17 23:12:43 +02:00
|
|
|
function onCancelButtonClick(event) {
|
2010-01-07 21:00:07 +01:00
|
|
|
window.close();
|
2008-07-17 23:12:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function onThisButtonClick(event) {
|
2010-01-07 21:00:07 +01:00
|
|
|
if (action == 'edit')
|
|
|
|
window.opener.performEventEdition(calendarFolder, componentName,
|
|
|
|
recurrenceName);
|
|
|
|
else if (action == 'delete')
|
|
|
|
window.opener.performEventDeletion(calendarFolder, componentName,
|
|
|
|
recurrenceName);
|
2014-07-11 23:04:06 +02:00
|
|
|
else if (action == 'adjust')
|
2010-02-11 03:36:43 +01:00
|
|
|
window.opener.performEventAdjustment(calendarFolder, componentName,
|
|
|
|
recurrenceName, queryParameters);
|
2010-01-07 21:00:07 +01:00
|
|
|
else
|
|
|
|
window.alert("Invalid action: " + action);
|
|
|
|
|
|
|
|
window.close();
|
2008-07-17 23:12:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function onAllButtonClick(event) {
|
2010-01-07 21:00:07 +01:00
|
|
|
if (action == 'edit')
|
|
|
|
window.opener.performEventEdition(calendarFolder, componentName);
|
|
|
|
else if (action == 'delete')
|
|
|
|
window.opener.performEventDeletion(calendarFolder, componentName);
|
2010-02-11 03:36:43 +01:00
|
|
|
else if (action == 'adjust')
|
|
|
|
window.opener.performEventAdjustment(calendarFolder, componentName,
|
|
|
|
null, queryParameters);
|
2010-01-07 21:00:07 +01:00
|
|
|
else
|
|
|
|
window.alert("Invalid action: " + action);
|
|
|
|
|
|
|
|
window.close();
|
2008-07-17 23:12:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function onOccurenceDialogLoad() {
|
2010-01-07 21:00:07 +01:00
|
|
|
var thisButton = $("thisButton");
|
|
|
|
thisButton.observe("click", onThisButtonClick);
|
2008-07-17 23:12:43 +02:00
|
|
|
|
2010-01-07 21:00:07 +01:00
|
|
|
var allButton = $("allButton");
|
|
|
|
allButton.observe("click", onAllButtonClick);
|
2008-07-17 23:12:43 +02:00
|
|
|
|
2010-01-07 21:00:07 +01:00
|
|
|
var cancelButton = $("cancelButton");
|
|
|
|
cancelButton.observe("click", onCancelButtonClick);
|
2008-07-17 23:12:43 +02:00
|
|
|
}
|
|
|
|
|
2009-03-12 22:09:14 +01:00
|
|
|
document.observe("dom:loaded", onOccurenceDialogLoad);
|