mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-28 06:35:26 +00:00
Merge branch 'master' into feature-gdpr-no-caldav
This commit is contained in:
@@ -124,21 +124,18 @@
|
||||
info = [self childInfo];
|
||||
|
||||
ud = [[[self context] activeUser] userDefaults];
|
||||
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
[viewer setPartPath: [self childPartPath]];
|
||||
if ([self decodedFlatContent])
|
||||
[viewer setDecodedContent: [parts objectAtIndex: i]];
|
||||
[viewer setAttachmentIds: attachmentIds
|
||||
displayAttachment:!([info objectForKey:@"disposition"]
|
||||
&& [[info objectForKey:@"disposition"] objectForKey:@"type"]
|
||||
&& [[[[info objectForKey:@"disposition"] objectForKey:@"type"] uppercaseString] isEqualToString:@"INLINE"]
|
||||
&& [ud hideInlineAttachments])];
|
||||
|
||||
if (!([info objectForKey:@"disposition"]
|
||||
&& [[info objectForKey:@"disposition"] objectForKey:@"type"]
|
||||
&& [[[[info objectForKey:@"disposition"] objectForKey:@"type"] uppercaseString] isEqualToString:@"INLINE"]
|
||||
&& [ud hideInlineAttachments])) {
|
||||
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
[viewer setPartPath: [self childPartPath]];
|
||||
if ([self decodedFlatContent])
|
||||
[viewer setDecodedContent: [parts objectAtIndex: i]];
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
|
||||
|
||||
[renderedParts addObject: [viewer renderedPart]];
|
||||
}
|
||||
[renderedParts addObject: [viewer renderedPart]];
|
||||
}
|
||||
|
||||
contentType = [NSString stringWithFormat: @"%@/%@",
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
@class NSData;
|
||||
@class NSFormatter;
|
||||
@class NSMutableDictionary;
|
||||
@class NSNumber;
|
||||
|
||||
@class SOGoMailBodyPart;
|
||||
|
||||
@@ -56,6 +57,7 @@
|
||||
NSData *flatContent;
|
||||
id decodedContent;
|
||||
NSDictionary *attachmentIds;
|
||||
BOOL _shouldDisplayAttachment;
|
||||
}
|
||||
|
||||
/* accessors */
|
||||
@@ -71,6 +73,7 @@
|
||||
|
||||
- (NSDictionary *) attachmentIds;
|
||||
- (void) setAttachmentIds: (NSDictionary *) newAttachmentIds;
|
||||
- (void) setAttachmentIds:(NSDictionary *)newAttachmentIds displayAttachment:(BOOL)shouldDisplayAttachment;
|
||||
|
||||
- (NSData *)flatContent;
|
||||
- (void) setFlatContent: (NSData *) theData;
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
attachmentIds = nil;
|
||||
flatContent = nil;
|
||||
decodedContent = nil;
|
||||
_shouldDisplayAttachment = YES;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -204,6 +205,7 @@
|
||||
[[self sizeFormatter] stringForObjectValue: [bodyInfo objectForKey: @"size"]], @"size",
|
||||
[self pathToAttachment], @"viewURL",
|
||||
[self pathForDownload], @"downloadURL",
|
||||
[NSNumber numberWithBool:_shouldDisplayAttachment], @"shouldDisplayAttachment",
|
||||
nil];
|
||||
}
|
||||
|
||||
@@ -222,6 +224,12 @@
|
||||
attachmentIds = newAttachmentIds;
|
||||
}
|
||||
|
||||
- (void) setAttachmentIds:(NSDictionary *)newAttachmentIds displayAttachment:(BOOL)shouldDisplayAttachment
|
||||
{
|
||||
[self setAttachmentIds: newAttachmentIds];
|
||||
_shouldDisplayAttachment = shouldDisplayAttachment;
|
||||
}
|
||||
|
||||
- (NSString *) flatContentAsString
|
||||
{
|
||||
NSString *charset, *s;
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete Event"
|
||||
ng-show="::editor.component.isErasable"
|
||||
ng-disabled="editor.isDeleting"
|
||||
ng-click="editor.deleteAllOccurrences()">
|
||||
<var:string label:value="Delete"/>
|
||||
</md-button>
|
||||
@@ -292,6 +293,7 @@
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete Event"
|
||||
ng-click="$mdMenu.open()"
|
||||
ng-disabled="editor.isDeleting"
|
||||
md-menu-origin="md-menu-origin">
|
||||
<var:string label:value="Delete"/> <md-icon>arrow_drop_down</md-icon>
|
||||
</md-button>
|
||||
@@ -299,6 +301,7 @@
|
||||
<md-menu-item>
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete This Occurrence"
|
||||
ng-disabled="editor.isDeleting"
|
||||
ng-click="editor.deleteOccurrence()">
|
||||
<md-icon>repeat_one</md-icon> <var:string label:value="Delete This Occurrence"/>
|
||||
</md-button>
|
||||
@@ -306,6 +309,7 @@
|
||||
<md-menu-item>
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete All Occurrences"
|
||||
ng-disabled="editor.isDeleting"
|
||||
ng-click="editor.deleteAllOccurrences()">
|
||||
<md-icon>repeat</md-icon> <var:string label:value="Delete All Occurrences"/>
|
||||
</md-button>
|
||||
@@ -339,6 +343,7 @@
|
||||
<md-dialog-actions ng-show="::editor.component.isInvitation()">
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete Event"
|
||||
ng-disabled="editor.isDeleting"
|
||||
ng-click="editor.deleteAllOccurrences()">
|
||||
<var:string label:value="Delete"/>
|
||||
</md-button>
|
||||
@@ -355,6 +360,7 @@
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete Event"
|
||||
ng-click="$mdMenu.open()"
|
||||
ng-disabled="editor.isDeleting"
|
||||
md-menu-origin="md-menu-origin">
|
||||
<var:string label:value="Delete"/> <md-icon>arrow_drop_down</md-icon>
|
||||
</md-button>
|
||||
@@ -362,6 +368,7 @@
|
||||
<md-menu-item>
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete This Occurrence"
|
||||
ng-disabled="editor.isDeleting"
|
||||
ng-click="editor.deleteOccurrence()">
|
||||
<md-icon>repeat_one</md-icon> <var:string label:value="Delete This Occurrence"/>
|
||||
</md-button>
|
||||
@@ -369,6 +376,7 @@
|
||||
<md-menu-item>
|
||||
<md-button class="md-warn"
|
||||
label:aria-label="Delete All Occurrences"
|
||||
ng-disabled="editor.isDeleting"
|
||||
ng-click="editor.deleteAllOccurrences()">
|
||||
<md-icon>repeat</md-icon> <var:string label:value="Delete All Occurrences"/>
|
||||
</md-button>
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -461,7 +461,9 @@
|
||||
|
||||
// Trusted content that can be compiled (Angularly-speaking)
|
||||
part.compile = true;
|
||||
parts.push(part);
|
||||
if (!Object.hasOwn(part, 'shouldDisplayAttachment') || 1 == part.shouldDisplayAttachment ) {
|
||||
parts.push(part);
|
||||
}
|
||||
}
|
||||
else {
|
||||
part.html = true;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -798,7 +798,6 @@
|
||||
*/
|
||||
Component.prototype.canRemindAttendeesByEmail = function() {
|
||||
return this.alarm.action == 'email' &&
|
||||
this.isEditable &&
|
||||
this.attendees && this.attendees.length > 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
this.calendarService = Calendar;
|
||||
this.service = Component;
|
||||
this.component = stateComponent;
|
||||
this.isDeleting = false;
|
||||
|
||||
// Put organizer in an array to display it as an mdChip
|
||||
this.organizer = [stateComponent.organizer];
|
||||
@@ -144,17 +145,26 @@
|
||||
};
|
||||
|
||||
this.deleteOccurrence = function () {
|
||||
this.component.remove(true).then(function() {
|
||||
$rootScope.$emit('calendars:list');
|
||||
$mdDialog.hide();
|
||||
});
|
||||
if (!this.isDeleting) {
|
||||
this.isDeleting = true;
|
||||
this.component.remove(true).then(function() {
|
||||
$rootScope.$emit('calendars:list');
|
||||
$mdDialog.hide();
|
||||
vm.isDeleting = false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.deleteAllOccurrences = function () {
|
||||
this.component.remove().then(function() {
|
||||
$rootScope.$emit('calendars:list');
|
||||
$mdDialog.hide();
|
||||
});
|
||||
if (!this.isDeleting) {
|
||||
this.isDeleting = true;
|
||||
this.component.remove().then(function () {
|
||||
$rootScope.$emit('calendars:list');
|
||||
$mdDialog.hide();
|
||||
vm.isDeleting = false;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.toggleRawSource = function ($event) {
|
||||
|
||||
Reference in New Issue
Block a user