From 15375460714e1ba0339ceea63ddc2eda73f8dbbe Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 23 Sep 2021 14:50:23 -0600 Subject: [PATCH] Calendar: Fixed activate links in location & description for 21.1 --- calendar/js/et2_widget_event.js | 14 +++++++++++--- calendar/js/et2_widget_event.ts | 27 ++++++++++++++++++++------- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index e322c28e00..c664787857 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -417,11 +417,19 @@ var et2_calendar_event = /** @class */ (function (_super) { } cat.destroy(); } + // Activate links in description + var description_node = document.createElement("p"); + description_node.className = "calendar_calEvent_description"; + et2_insertLinkText(et2_activateLinks(egw.htmlspecialchars(this.options.value.description)), description_node, '_blank'); // Location + Videoconference var location = ''; if (this.options.value.location || this.options.value['##videoconference']) { - location += '

' + this.egw().lang('Location') + ':' + - egw.htmlspecialchars(this.options.value.location); + location = '

'; + var location_node = document.createElement("span"); + location_node.className = "calendar_calEventLabel"; + et2_insertLinkText(et2_activateLinks(this.egw().lang('Location') + ':' + + egw.htmlspecialchars(this.options.value.location)), location_node, '_blank'); + location += location_node.outerHTML; if (this.options.value['##videoconference']) { // Click handler is set in _bind_videoconference() location += (this.options.value.location.trim() ? '
' : '') + @@ -453,7 +461,7 @@ var et2_calendar_event = /** @class */ (function (_super) { '' + '

' + '

' + egw.htmlspecialchars(this.options.value.title) + '


' + - egw.htmlspecialchars(this.options.value.description) + '

' + + description_node.outerHTML + '

' + times + '

' + location + (cat_label ? '

' + this.egw().lang('Category') + ':

' + cat_label + '

' : '') + diff --git a/calendar/js/et2_widget_event.ts b/calendar/js/et2_widget_event.ts index 6b4fd075af..25d6e41512 100644 --- a/calendar/js/et2_widget_event.ts +++ b/calendar/js/et2_widget_event.ts @@ -531,19 +531,32 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached cat.destroy(); } + // Activate links in description + let description_node = document.createElement("p"); + description_node.className = "calendar_calEvent_description"; + et2_insertLinkText( + et2_activateLinks(egw.htmlspecialchars(this.options.value.description)), description_node, '_blank' + ); + // Location + Videoconference let location = ''; if(this.options.value.location || this.options.value['##videoconference']) { - location += '

' + this.egw().lang('Location') + ':' + - egw.htmlspecialchars(this.options.value.location); - if(this.options.value['##videoconference']) + location = '

'; + let location_node = document.createElement("span"); + location_node.className = "calendar_calEventLabel"; + et2_insertLinkText(et2_activateLinks( + this.egw().lang('Location') + ':' + + egw.htmlspecialchars(this.options.value.location)), location_node, '_blank'); + location += location_node.outerHTML; + + if (this.options.value['##videoconference']) { // Click handler is set in _bind_videoconference() location += (this.options.value.location.trim() ? '
' : '') + - ''+ + '' + this.egw().lang('Video conference') + ''; this._bind_videoconference(); @@ -574,7 +587,7 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached '

'+ '
'+ '

'+egw.htmlspecialchars(this.options.value.title)+'


'+ - egw.htmlspecialchars(this.options.value.description)+'

'+ + description_node.outerHTML + '

'+times+'

'+ location + (cat_label ? '

'+this.egw().lang('Category') + ':

' + cat_label +'

' : '')+