Merge branch 'master' of github.com:inverse-inc/sogo

This commit is contained in:
Wolfgang Sourdeau
2012-09-19 12:25:45 -04:00
13 changed files with 70 additions and 27 deletions

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
config.make
*/obj/
*/*/obj/
*/*/*/obj/
*/*/*.SOGo/
*.sax
*.wox/
*.swp
SoObjects/SOGo/SOGo.framework/
SoObjects/SOGo/derived_src/

View File

@@ -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:";

View File

@@ -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

View File

@@ -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;

View File

@@ -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];

View File

@@ -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 = currentStart + (5*60);
eventBlock = [self _eventBlockWithStart: currentStart
end: computedEventEnd
number: number
onDay: currentDayStart
recurrenceTime: recurrenceTime
userState: userState];
[currentDay addObject: eventBlock];
}
}
}

View File

@@ -23,6 +23,8 @@ h1, dd, .dl-list dt { margin-left: 130px; }
<h1><var:string value="aptSummary" const:escapeHTML="NO"/></h1>
<dl class="dl-horizontal">
<dt><var:string label:value="calendar_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="calendarName" const:escapeHTML="NO"/></dd>
<var:if condition="apt.location.length"
><dt><var:string label:value="location_label" const:escapeHTML="NO"/></dt>
<dd><var:string value="apt.location" const:escapeHTML="NO"/></dd></var:if>

View File

@@ -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 */ }

View File

@@ -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;

View File

@@ -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

View File

@@ -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)

View File

@@ -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 {

View File

@@ -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();