diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index e6f572835..9b51417f5 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -477,6 +477,13 @@ example. Defaults to `YES` when unset. +|S |SOGoCalendarEnableJitsiLink +|Parameter allowing users to create Jitsi link when creating an event. +Be aware that a least one of the attendees will need an account from a +platform that Jitsi supports: Google, Facebook or Github + +Defaults to `NO` when unset. + |S |SOGoSAML2PrivateKeyLocation |The location of the SSL private key file on the filesystem that is used by SOGo to sign and encrypt communications with the SAML2 identity diff --git a/SoObjects/SOGo/SOGoSystemDefaults.h b/SoObjects/SOGo/SOGoSystemDefaults.h index f024da999..055d40bae 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.h +++ b/SoObjects/SOGo/SOGoSystemDefaults.h @@ -55,6 +55,7 @@ static const NSString *kDisableSharingCalendar = @"Calendar"; - (BOOL) isWebAccessEnabled; - (BOOL) isCalendarDAVAccessEnabled; +- (BOOL) isCalendarJitsiLinkEnabled; - (BOOL) isAddressBookDAVAccessEnabled; - (BOOL) enableEMailAlarms; diff --git a/SoObjects/SOGo/SOGoSystemDefaults.m b/SoObjects/SOGo/SOGoSystemDefaults.m index 52fad7b9a..c51ab37ed 100644 --- a/SoObjects/SOGo/SOGoSystemDefaults.m +++ b/SoObjects/SOGo/SOGoSystemDefaults.m @@ -441,6 +441,11 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict, return [self boolForKey: @"SOGoCalendarDAVAccessEnabled"]; } +- (BOOL) isCalendarJitsiLinkEnabled +{ + return [self boolForKey: @"SOGoCalendarEnableJitsiLink"]; +} + - (BOOL) isAddressBookDAVAccessEnabled { return [self boolForKey: @"SOGoAddressBookDAVAccessEnabled"]; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index ebc5b2462..5cde4fad6 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -117,6 +117,7 @@ "Save and Close" = "Save and Close"; "Close" = "Close"; "Invite Attendees" = "Invite Attendees"; +"Create Jitsi Meeting" = "Create Jitsi Meeting"; "Attach" = "Attach"; "Update" = "Update"; "Cancel" = "Cancel"; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index fe06919ee..bb471de37 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -117,6 +117,7 @@ "Save and Close" = "Enregistrer et fermer"; "Close" = "Fermer"; "Invite Attendees" = "Participants"; +"Create Jitsi Meeting" = "Créer Une Réunion Jitsi"; "Attach" = "Joindre"; "Update" = "Mettre à jour"; "Cancel" = "Annuler"; diff --git a/UI/Scheduler/UIxCalMainView.m b/UI/Scheduler/UIxCalMainView.m index e59a72572..dc792c1b2 100644 --- a/UI/Scheduler/UIxCalMainView.m +++ b/UI/Scheduler/UIxCalMainView.m @@ -517,7 +517,15 @@ @interface UIxAppointmentEditorTemplate : UIxComponentEditorTemplate @end + @implementation UIxAppointmentEditorTemplate + +- (BOOL) showJitsiLinkCreation +{ + SOGoSystemDefaults *sd; + sd = [SOGoSystemDefaults sharedSystemDefaults]; + return [sd isCalendarJitsiLinkEnabled]; +} @end /* Task Editor */ diff --git a/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox b/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox index 5693315a8..321a65349 100644 --- a/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox +++ b/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox @@ -120,6 +120,19 @@ label:aria-label="Send Appointment Notifications"> + + +
+ + add_circle + + +
+
+ +
diff --git a/UI/WebServerResources/js/Scheduler/Component.service.js b/UI/WebServerResources/js/Scheduler/Component.service.js index 84a2146a4..da6df5807 100644 --- a/UI/WebServerResources/js/Scheduler/Component.service.js +++ b/UI/WebServerResources/js/Scheduler/Component.service.js @@ -831,11 +831,33 @@ * @param {number} index - the URL index in the list of attach URLs */ Component.prototype.deleteAttachUrl = function(index) { + if (index > -1 && this.attachUrls.length > index) { this.attachUrls.splice(index, 1); } }; + /** + * @function hasJitsiUrl + * @memberof Component.prototype + * @desc Check if the there is a jisti url + * @returns true if there is a jisti url + */ + Component.prototype.hasJitsiUrl = function() { + if (angular.isUndefined(this.attachUrls)) { + return false; + } + else { + for (var i = 0; i < this.attachUrls.length; i++) { + if (this.attachUrls[i].value.includes("meet.jit.si")) { + return true; + } + } + } + + return false; + }; + /** * @function $addDueDate * @memberof Component.prototype diff --git a/UI/WebServerResources/js/Scheduler/ComponentController.js b/UI/WebServerResources/js/Scheduler/ComponentController.js index 3afa87438..0dbbec769 100644 --- a/UI/WebServerResources/js/Scheduler/ComponentController.js +++ b/UI/WebServerResources/js/Scheduler/ComponentController.js @@ -313,6 +313,12 @@ focus('attachUrl_' + i); }; + this.addJitsiUrl = function () { + var jitsiUrl = "https://meet.jit.si/SOGo_meeting/" + crypto.randomUUID(); + var i = this.component.addAttachUrl(jitsiUrl); + focus('attachUrl_' + i); + }; + this.toggleRecurrenceEditor = function () { this.showRecurrenceEditor = !this.showRecurrenceEditor; this.component.$hasCustomRepeat = this.showRecurrenceEditor;