mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-28 01:22:44 +00:00
See ChangeLog
Fix for bug #212 Monotone-Parent: 4e15640eabc9053b15d1d41557d0a3d2e9ddd1ec Monotone-Revision: f9a5012ee107f7a23f74fa23e06ce8a63fcab7eb Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-10-30T14:43:36 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
var ComponentEditor = {
|
||||
attendeesWindow: null,
|
||||
recurrenceWindow: null,
|
||||
reminderWindow: null
|
||||
};
|
||||
|
||||
function onPopupAttendeesWindow(event) {
|
||||
if (event)
|
||||
preventDefault(event);
|
||||
window.open(ApplicationBaseURL + "/editAttendees", null,
|
||||
"width=803,height=573");
|
||||
|
||||
if (ComponentEditor.attendeesWindow && ComponentEditor.attendeesWindow.open && !ComponentEditor.attendeesWindow.closed)
|
||||
ComponentEditor.attendeesWindow.focus();
|
||||
else
|
||||
ComponentEditor.attendeesWindow = window.open(ApplicationBaseURL + "/editAttendees",
|
||||
sanitizeWindowName(activeCalendar + activeComponent + "Attendees"),
|
||||
"width=803,height=573");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -165,6 +175,7 @@ function onComponentEditorLoad(event) {
|
||||
tmp.observe("keyup", onSummaryChange);
|
||||
|
||||
Event.observe(window, "resize", onWindowResize);
|
||||
Event.observe(window, "beforeunload", onComponentEditorClose);
|
||||
|
||||
onPopupRecurrenceWindow(null);
|
||||
onPopupReminderWindow(null);
|
||||
@@ -207,6 +218,15 @@ function onReplyChange(event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function onComponentEditorClose(event) {
|
||||
if (ComponentEditor.attendeesWindow && ComponentEditor.attendeesWindow.open && !ComponentEditor.attendeesWindow.closed)
|
||||
ComponentEditor.attendeesWindow.close();
|
||||
if (ComponentEditor.recurrenceWindow && ComponentEditor.recurrenceWindow.open && !ComponentEditor.recurrenceWindow.closed)
|
||||
ComponentEditor.recurrenceWindow.close();
|
||||
if (ComponentEditor.reminderWindow && ComponentEditor.reminderWindow.open && !ComponentEditor.reminderWindow.closed)
|
||||
ComponentEditor.reminderWindow.close();
|
||||
}
|
||||
|
||||
function onWindowResize(event) {
|
||||
var comment = $("commentArea");
|
||||
if (comment) {
|
||||
@@ -262,9 +282,14 @@ function onPopupRecurrenceWindow(event) {
|
||||
if (repeatList && repeatList.value == 7) {
|
||||
// Custom repeat rule
|
||||
repeatHref.show();
|
||||
if (event)
|
||||
window.open(ApplicationBaseURL + "editRecurrence", null,
|
||||
"width=500,height=400");
|
||||
if (event) {
|
||||
if (ComponentEditor.recurrenceWindow && ComponentEditor.recurrenceWindow.open && !ComponentEditor.recurrenceWindow.closed)
|
||||
ComponentEditor.recurrenceWindow.focus();
|
||||
else
|
||||
ComponentEditor.recurrenceWindow = window.open(ApplicationBaseURL + "editRecurrence",
|
||||
sanitizeWindowName(activeCalendar + activeComponent + "Recurrence"),
|
||||
"width=500,height=400");
|
||||
}
|
||||
}
|
||||
else if (repeatHref)
|
||||
repeatHref.hide();
|
||||
@@ -281,9 +306,14 @@ function onPopupReminderWindow(event) {
|
||||
var reminderList = $("reminderList");
|
||||
if (reminderList && reminderList.value == 15) {
|
||||
reminderHref.show();
|
||||
if (event)
|
||||
window.open(ApplicationBaseURL + "editReminder", null,
|
||||
"width=250,height=150");
|
||||
if (event) {
|
||||
if (ComponentEditor.reminderWindow && ComponentEditor.reminderWindow.open && !ComponentEditor.reminderWindow.closed)
|
||||
ComponentEditor.reminderWindow.focus();
|
||||
else
|
||||
ComponentEditor.reminderWindow = window.open(ApplicationBaseURL + "editReminder",
|
||||
sanitizeWindowName(activeCalendar + activeComponent + "Reminder"),
|
||||
"width=250,height=150");
|
||||
}
|
||||
}
|
||||
else if (reminderHref)
|
||||
reminderHref.hide();
|
||||
|
||||
Reference in New Issue
Block a user