* Calendar: Fix missing category in event tooltip

This commit is contained in:
nathangray 2020-10-26 09:04:11 -06:00
parent b8409a479e
commit 0a180921e4
2 changed files with 6 additions and 6 deletions

View File

@ -403,12 +403,12 @@ var et2_calendar_event = /** @class */ (function (_super) {
if (this.options.value.category) { if (this.options.value.category) {
var cat = et2_createWidget('select-cat', { 'readonly': true }, this); var cat = et2_createWidget('select-cat', { 'readonly': true }, this);
cat.set_value(this.options.value.category); cat.set_value(this.options.value.category);
var cat_label_1 = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : []; cat_label = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : [];
if (typeof cat_label_1 != 'string') { if (typeof cat_label != 'string') {
cat.span.children().each(function () { cat.span.children().each(function () {
cat_label_1.push(jQuery(this).text()); cat_label.push(jQuery(this).text());
}); });
cat_label_1 = cat_label_1.join(', '); cat_label = cat_label.join(', ');
} }
cat.destroy(); cat.destroy();
} }

View File

@ -511,12 +511,12 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached
'<span class="calendar_calEventLabel">' + this.egw().lang('Time') + '</span>:' + timespan : '<span class="calendar_calEventLabel">' + this.egw().lang('Time') + '</span>:' + timespan :
'<span class="calendar_calEventLabel">' + this.egw().lang('Start') + '</span>:' + start + ' ' + '<span class="calendar_calEventLabel">' + this.egw().lang('Start') + '</span>:' + start + ' ' +
'<span class="calendar_calEventLabel">' + this.egw().lang('End') + '</span>:' + end; '<span class="calendar_calEventLabel">' + this.egw().lang('End') + '</span>:' + end;
let cat_label = ''; let cat_label: (string | string[]) = '';
if(this.options.value.category) if(this.options.value.category)
{ {
const cat = et2_createWidget('select-cat', {'readonly': true}, this); const cat = et2_createWidget('select-cat', {'readonly': true}, this);
cat.set_value(this.options.value.category); cat.set_value(this.options.value.category);
let cat_label : (string | string[]) = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : []; cat_label = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : [];
if(typeof cat_label != 'string') if(typeof cat_label != 'string')
{ {
cat.span.children().each(function() { cat.span.children().each(function() {