From a98bd71ec49debcf2c6710d2402e871baac3857f Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 18 Sep 2012 11:27:11 -0400 Subject: [PATCH 01/10] Mail filters: CSS fix for input field length The extra input field for rules based on a custom header must be smaller in order for the rule to span only one row. --- UI/WebServerResources/UIxFilterEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/WebServerResources/UIxFilterEditor.js b/UI/WebServerResources/UIxFilterEditor.js index 929f859d5..b64c85bb1 100644 --- a/UI/WebServerResources/UIxFilterEditor.js +++ b/UI/WebServerResources/UIxFilterEditor.js @@ -312,7 +312,7 @@ function ensureFieldCustomHeaderRepresentation(container, fieldSpan) { } if (container.rule.field == "header") { if (!headerInput) { - headerInput = createElement("input", null, "textField", + headerInput = createElement("input", null, null, { type: "text" }, null, fieldSpan); headerInput.rule = container.rule; if (!container.rule.custom_header) From 56a9692da45d8243869eaf5aa811d03b3496dadd Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 18 Sep 2012 15:04:14 -0400 Subject: [PATCH 02/10] Single-window mode: fixed closing of popup window --- UI/WebServerResources/generic.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index af1a7b620..7b18a6354 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -1665,10 +1665,12 @@ function onCloseButtonClick(event) { Event.stop(event); if (window.frameElement && window.frameElement.id) { - jQuery(parent$("bgFrameDiv")).fadeOut('fast'); - var div = parent$("popupFrame"); - div.hide(); - div.down("iframe").src = "/SOGo/loading"; + var bgDiv = parent$("bgFrameDiv"); + jQuery(bgDiv).fadeOut('fast', function(event) { + var div = parent$("popupFrame"); + div.hide(); + div.down("iframe").src = "/SOGo/loading"; + }); } else { window.close(); From 802f081f28afec53d6a95f8357ef66853c03f05e Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 18 Sep 2012 15:05:02 -0400 Subject: [PATCH 03/10] Mail Editor: prohibit double-click on send button Added a "safety net" like when loading a page (UIxPageFrame) to avoid double-clicking on the send button. --- UI/WebServerResources/UIxMailEditor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 31bd83a45..829b9c9de 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -123,6 +123,10 @@ function onValidate(onSuccess) { } function onValidateDone(onSuccess) { + // Create "blocking" div to avoid double-clicking on send button + var safetyNet = createElement("div", "javascriptSafetyNet"); + $('pageContent').insert({top: safetyNet}); + var input = currentAttachmentInput(); if (input) input.parentNode.removeChild(input); @@ -137,7 +141,7 @@ function onValidateDone(onSuccess) { window.shouldPreserve = true; document.pageform.action = "send"; - + AIM.submit($(document.pageform), {'onComplete' : onPostComplete}); if (typeof onSuccess == 'function') @@ -159,7 +163,7 @@ function onPostComplete(response) { p = window.opener; if (p && p.refreshMessage) p.refreshMessage(jsonResponse["sourceFolder"], - jsonResponse["messageID"]); + jsonResponse["messageID"]); onCloseButtonClick(); } else { @@ -170,6 +174,8 @@ function onPostComplete(response) { progressImage.parentNode.removeChild(progressImage); } showAlertDialog(jsonResponse["message"]); + // Remove "blocking" div + onFinalLoadHandler(); // from generic.js } } else { From 9b3e4c8ab88c5ccb4a7be972bc0fb211226d1117 Mon Sep 17 00:00:00 2001 From: Luc Charland Date: Wed, 19 Sep 2012 08:41:40 -0400 Subject: [PATCH 04/10] Added .gitignore to cleanup git status --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..eaa781829 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +config.make +*/obj/ +*/*/obj/ +*/*/*/obj/ +*/*/*.SOGo/ +*.sax +*.wox/ +*.swp +SoObjects/SOGo/SOGo.framework/ +SoObjects/SOGo/derived_src/ From 491089e194a413dcb317a6267da24144fb2ed3cd Mon Sep 17 00:00:00 2001 From: Luc Charland Date: Wed, 19 Sep 2012 09:18:00 -0400 Subject: [PATCH 05/10] Fixed bug 1929: Notifications about Modifications Notifications about Modifications don't show the Calendar name. When an email notification is selected by the user, the calendar name from which the event was changed is added to the email. Needs to be translated. --- .../Appointments/English.lproj/Localizable.strings | 1 + SoObjects/Appointments/SOGoAptMailReceipt.h | 3 +++ SoObjects/Appointments/SOGoAptMailReceipt.m | 12 ++++++++++++ SoObjects/Appointments/SOGoCalendarComponent.m | 5 ++++- UI/Templates/Appointments/SOGoAptMailReceipt.wox | 2 ++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/SoObjects/Appointments/English.lproj/Localizable.strings b/SoObjects/Appointments/English.lproj/Localizable.strings index 9bce92a0a..75f6d88bd 100644 --- a/SoObjects/Appointments/English.lproj/Localizable.strings +++ b/SoObjects/Appointments/English.lproj/Localizable.strings @@ -16,6 +16,7 @@ vtodo_class2 = "(Confidential task)"; "The following attendees(s) were removed:" = "The following attendee(s) were removed:"; /* IMIP messages */ +"calendar_label" = "Calendar:"; "startDate_label" = "Start:"; "endDate_label" = "End:"; "due_label" = "Due Date:"; diff --git a/SoObjects/Appointments/SOGoAptMailReceipt.h b/SoObjects/Appointments/SOGoAptMailReceipt.h index c5c909635..ffc1efe93 100644 --- a/SoObjects/Appointments/SOGoAptMailReceipt.h +++ b/SoObjects/Appointments/SOGoAptMailReceipt.h @@ -40,6 +40,7 @@ NSArray *updatedAttendees; iCalPerson *currentRecipient; SOGoEventOperation operation; + NSString *calendarName; } - (void) setOriginator: (NSString *) newOriginator; @@ -47,8 +48,10 @@ - (void) setDeletedAttendees: (NSArray *) theAttendees; - (void) setUpdatedAttendees: (NSArray *) theAttendees; - (void) setOperation: (SOGoEventOperation) theOperation; +- (void) setCalendarName: (NSString *) theCalendarName; - (NSString *) aptSummary; +- (NSString *) calendarName; @end diff --git a/SoObjects/Appointments/SOGoAptMailReceipt.m b/SoObjects/Appointments/SOGoAptMailReceipt.m index 1431b218d..5aa4295eb 100644 --- a/SoObjects/Appointments/SOGoAptMailReceipt.m +++ b/SoObjects/Appointments/SOGoAptMailReceipt.m @@ -64,6 +64,7 @@ static NSCharacterSet *wsSet = nil; addedAttendees = nil; deletedAttendees = nil; updatedAttendees = nil; + calendarName = nil; } return self; @@ -75,6 +76,7 @@ static NSCharacterSet *wsSet = nil; [addedAttendees release]; [deletedAttendees release]; [updatedAttendees release]; + [calendarName release]; [super dealloc]; } @@ -140,6 +142,16 @@ static NSCharacterSet *wsSet = nil; operation = theOperation; } +- (void) setCalendarName: (NSString *) theCalendarName +{ + ASSIGN (calendarName, theCalendarName); +} + +- (NSString *) calendarName +{ + return calendarName; +} + - (NSString *) aptSummary { NSString *s; diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 8163cda53..a33d5fb4c 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -982,7 +982,7 @@ updatedAttendees: (NSArray *) theUpdatedAttendees operation: (SOGoEventOperation) theOperation { - NSString *mailDate, *mailText, *fullSenderEmail, *senderEmail, *fullRecipientEmail, *recipientEmail; + NSString *calendarName, *mailDate, *mailText, *fullSenderEmail, *senderEmail, *fullRecipientEmail, *recipientEmail; NSDictionary *senderIdentity, *recipientIdentity; SOGoAptMailReceipt *page; NGMutableHashMap *headerMap; @@ -990,6 +990,8 @@ SOGoUser *currentUser; SOGoDomainDefaults *dd; + calendarName = [[self container] displayName]; + // We must handle three cases here: // - Receive a mail when I modify my calendar // - Receive a mail when someone else modifies my calendar @@ -1003,6 +1005,7 @@ [page setDeletedAttendees: theDeletedAttendees]; [page setUpdatedAttendees: theUpdatedAttendees]; [page setOperation: theOperation]; + [page setCalendarName: calendarName]; currentUser = [context activeUser]; senderIdentity = [currentUser primaryIdentity]; diff --git a/UI/Templates/Appointments/SOGoAptMailReceipt.wox b/UI/Templates/Appointments/SOGoAptMailReceipt.wox index c93a1dc3e..f574903c3 100644 --- a/UI/Templates/Appointments/SOGoAptMailReceipt.wox +++ b/UI/Templates/Appointments/SOGoAptMailReceipt.wox @@ -23,6 +23,8 @@ h1, dd, .dl-list dt { margin-left: 130px; }

+
+
From dbb9bac38c72a71b60a54b505f546aa961d9cd41 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 19 Sep 2012 10:54:57 -0400 Subject: [PATCH 06/10] Fix for bug #1571. --- UI/Scheduler/UIxCalListingActions.m | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 5a4bbdf93..ee6528c2c 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -668,7 +668,7 @@ _userStateInEvent (NSArray *event) withNumber: (NSNumber *) number { int currentDayStart, startSecs, endsSecs, currentStart, eventStart, - eventEnd, offset, recurrenceTime, swap; + eventEnd, computedEventEnd, offset, recurrenceTime, swap; NSMutableArray *currentDay; NSMutableDictionary *eventBlock; iCalPersonPartStat userState; @@ -738,19 +738,21 @@ _userStateInEvent (NSArray *event) offset++; currentDay = [blocks objectAtIndex: offset]; } - if (eventEnd > currentStart) - { - eventBlock = [self _eventBlockWithStart: currentStart - end: eventEnd - number: number - onDay: currentDayStart - recurrenceTime: recurrenceTime - userState: userState]; - [currentDay addObject: eventBlock]; - } - else - [self warnWithFormat: @"event '%@' has end <= start: %d < %d", - [event objectAtIndex: eventNameIndex], eventEnd, currentStart]; + + computedEventEnd = eventEnd; + + // We add 5 mins to the end date of an event if the end date + // is equal or smaller than the event's start date. + if (eventEnd <= currentStart) + computedEventEnd += (5*60); + + eventBlock = [self _eventBlockWithStart: currentStart + end: computedEventEnd + number: number + onDay: currentDayStart + recurrenceTime: recurrenceTime + userState: userState]; + [currentDay addObject: eventBlock]; } } } From 49fafb498877139ff3e264460ec73e61aabdae09 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 19 Sep 2012 11:20:30 -0400 Subject: [PATCH 07/10] Scheduler: dynamic height for mini-calendar Fixes #1788. --- UI/WebServerResources/SchedulerUI.css | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index 7c37cb07a..479476cd6 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -151,7 +151,6 @@ DIV#dateSelectorView #dateSelector { margin: 0px auto; - height: 13.5em; background-color: #fff; border-top: 1px solid #909090 !important; border-left: 1px solid #FFFFFF !important; @@ -193,9 +192,6 @@ DIV#dateSelectorView #dateSelector .dayOfWeek { color: #00f; } -TABLE#dateSelectorTable -{ padding: 2px; } - #dateSelector TABLE, #dateSelector TABLE TABLE { border-collapse: collapse; @@ -203,6 +199,9 @@ TABLE#dateSelectorTable margin: 0px auto; width: 100%; } +TABLE#dateSelectorTable +{ margin-bottom: 5px; } + TABLE#dateSelectorTable TD TABLE TD { width: 5px; /* temp hack */ } From bda87eba071811e8be0cb7cc20de4709b9a45937 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 19 Sep 2012 11:24:25 -0400 Subject: [PATCH 08/10] Attendees window: fixed autocompletion selection Fixed the keyboard arrows navigation within the popup menu of matching entries. --- UI/WebServerResources/UIxAttendeesEditor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/UI/WebServerResources/UIxAttendeesEditor.js b/UI/WebServerResources/UIxAttendeesEditor.js index e0ce82be0..f0f9731b2 100644 --- a/UI/WebServerResources/UIxAttendeesEditor.js +++ b/UI/WebServerResources/UIxAttendeesEditor.js @@ -100,6 +100,7 @@ function onContactKeydown(event) { preventDefault(event); this.scrollLeft = 0; $(this).up('DIV').scrollLeft = 0; + attendeesEditor.selectedIndex = -1; if (this.confirmedValue) this.value = this.confirmedValue; this.hasfreebusy = false; From 85787e955903be62b5b066e7a81184be6e3065c9 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 19 Sep 2012 11:26:54 -0400 Subject: [PATCH 09/10] Event editor: ellipsis overflow to attendees list --- UI/WebServerResources/UIxComponentEditor.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/UIxComponentEditor.css b/UI/WebServerResources/UIxComponentEditor.css index b7df83dc5..fd171a4e4 100644 --- a/UI/WebServerResources/UIxComponentEditor.css +++ b/UI/WebServerResources/UIxComponentEditor.css @@ -30,7 +30,9 @@ SPAN.content line-height: 2em; top: -.25em; left: 8em; - right: 1em; } + right: 1em; + text-overflow: ellipsis; + overflow: hidden; } SPAN.content > INPUT.textField, LABEL#commentArea textarea From 7154588b24ae5179f4f6cc5c2d01d223700e6441 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 19 Sep 2012 11:46:01 -0400 Subject: [PATCH 10/10] Improved previous commit. We now use the start date instead of the end date. --- UI/Scheduler/UIxCalListingActions.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index ee6528c2c..e3d271f95 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -744,7 +744,7 @@ _userStateInEvent (NSArray *event) // We add 5 mins to the end date of an event if the end date // is equal or smaller than the event's start date. if (eventEnd <= currentStart) - computedEventEnd += (5*60); + computedEventEnd = currentStart + (5*60); eventBlock = [self _eventBlockWithStart: currentStart end: computedEventEnd