fix(mail(js)): allow to add any event invitation
parent
9e364c647f
commit
56f9e3e398
|
@ -35,6 +35,7 @@
|
|||
#import <NGImap4/NGImap4EnvelopeAddress.h>
|
||||
|
||||
#import <Appointments/iCalEvent+SOGo.h>
|
||||
#import <Appointments/iCalEntityObject+SOGo.h>
|
||||
#import <Appointments/iCalPerson+SOGo.h>
|
||||
#import <Appointments/SOGoAppointmentObject.h>
|
||||
#import <Appointments/SOGoAppointmentFolder.h>
|
||||
|
@ -331,6 +332,7 @@
|
|||
{
|
||||
iCalEvent *emailEvent;
|
||||
SOGoAppointmentObject *eventObject;
|
||||
SOGoUser *user;
|
||||
WOResponse *response;
|
||||
|
||||
emailEvent = [self _emailEvent];
|
||||
|
@ -339,6 +341,12 @@
|
|||
eventObject = [self _eventObjectWithUID: [emailEvent uid]];
|
||||
if ([eventObject isNew])
|
||||
{
|
||||
user = [context activeUser];
|
||||
if (![emailEvent userIsOrganizer: user] && ![emailEvent userIsAttendee: user])
|
||||
{
|
||||
[emailEvent setOrganizer: nil];
|
||||
[emailEvent removeAllAttendees];
|
||||
}
|
||||
[eventObject saveCalendar: [emailEvent parent]];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
|
|
|
@ -151,6 +151,16 @@
|
|||
<var:string value="organizerDisplayName" />
|
||||
</a>
|
||||
<var:string label:value="request_info_no_attendee" />
|
||||
<var:if condition="hasCalendarAccess">
|
||||
<var:if condition="isEventStoredInCalendar" const:negate="YES">
|
||||
<!-- Add event to calendar even if the user is not invite -->
|
||||
<div layout="row" layout-align="start center">
|
||||
<md-button class="md-raised" type="button" ng-click="iCalendarAction('addToCalendar')">
|
||||
<var:string label:value="Add to calendar" />
|
||||
</md-button>
|
||||
</div>
|
||||
</var:if>
|
||||
</var:if>
|
||||
</p>
|
||||
</var:if>
|
||||
|
||||
|
@ -182,8 +192,7 @@
|
|||
</var:if>
|
||||
|
||||
<!-- IMIP CANCEL - sent to attendees to notify of the attendee
|
||||
being removed or the
|
||||
event being deleted -->
|
||||
being removed or the event being deleted -->
|
||||
<var:if condition="inCalendar.method.uppercaseString" const:value="CANCEL">
|
||||
<p><var:string label:value="cancel_info_text" /></p>
|
||||
<var:if condition="isEventStoredInCalendar">
|
||||
|
@ -255,15 +264,15 @@
|
|||
<label class="pseudo-input-label"><var:string label:value="Attendees"/></label>
|
||||
<!-- md-contact-chips don't support "readonly", so we build them using md-chips
|
||||
in readonly mode and a template similar to the one of md-contact-chips -->
|
||||
<md-chips class="md-contact-chips sg-readonly"
|
||||
<md-chips class="md-contact-chips sg-readonly sg-with-secondary"
|
||||
ng-model="::part.participants"
|
||||
readonly="true">
|
||||
<md-chip-template>
|
||||
<div class="md-contact-avatar">
|
||||
<sg-avatar-image sg-email="$chip.email" size="32">person</sg-avatar-image>
|
||||
<sg-avatar-image sg-email="$chip.email" size="26">person</sg-avatar-image>
|
||||
</div>
|
||||
<div class="md-contact-name">{{$chip.name}}</div>
|
||||
<md-icon ng-class="'icon-' + $chip.partstat"><!-- partstat --></md-icon>
|
||||
<md-icon class="sg-secondary" ng-class="'icon-' + $chip.partstat"><!-- partstat --></md-icon>
|
||||
</md-chip-template>
|
||||
</md-chips>
|
||||
</div>
|
||||
|
|
|
@ -599,9 +599,9 @@
|
|||
this.repeat.end = 'never';
|
||||
this.$hasCustomRepeat = this.hasCustomRepeat();
|
||||
|
||||
var type = (this.type == 'appointment')? 'Events' : 'Tasks';
|
||||
if (this.isNew) {
|
||||
// Set default values
|
||||
var type = (this.type == 'appointment')? 'Events' : 'Tasks';
|
||||
|
||||
// Set default classification
|
||||
this.classification = Component.$Preferences.defaults['SOGoCalendar' + type + 'DefaultClassification'].toLowerCase();
|
||||
|
@ -618,9 +618,14 @@
|
|||
// Set notitifications
|
||||
this.sendAppointmentNotifications = Component.$Preferences.defaults.SOGoAppointmentSendEMailNotifications;
|
||||
}
|
||||
else if (angular.isUndefined(data.$hasAlarm)) {
|
||||
else {
|
||||
if (angular.isUndefined(data.$hasAlarm)) {
|
||||
this.$hasAlarm = angular.isDefined(data.alarm);
|
||||
}
|
||||
if (angular.isUndefined(data.classification)) {
|
||||
this.classification = Component.$Preferences.defaults['SOGoCalendar' + type + 'DefaultClassification'].toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
// Allow the component to be moved to a different calendar
|
||||
this.destinationCalendar = this.pid;
|
||||
|
|
Loading…
Reference in New Issue