Calendar: Prefer icon from link registry, fall back to app icon if it's not set

This commit is contained in:
nathangray 2021-02-23 11:44:38 -07:00
parent 60a486298c
commit 7b466aed56
2 changed files with 4 additions and 2 deletions

View File

@ -498,7 +498,8 @@ var et2_calendar_event = /** @class */ (function (_super) {
}
else {
if (this.options.value.app !== 'calendar') {
icons.push('<img src="' + this.egw().image('navbar', this.options.value.app) + '" title="' + this.egw().lang(this.options.value.app) + '"/>');
var app_icon = "" + (egw.link_get_registry(this.options.value.app, 'icon') || (this.options.value.app + '/navbar'));
icons.push('<img src="' + this.egw().image(app_icon) + '" title="' + this.egw().lang(this.options.value.app) + '"/>');
}
if (this.options.value.priority == 3) {
icons.push('<img src="' + this.egw().image('high', 'calendar') + '" title="' + this.egw().lang('high priority') + '"/>');

View File

@ -633,7 +633,8 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached
{
if(this.options.value.app !== 'calendar')
{
icons.push('<img src="'+this.egw().image('navbar',this.options.value.app)+'" title="'+this.egw().lang(this.options.value.app)+'"/>');
let app_icon = ""+(egw.link_get_registry(this.options.value.app,'icon') || (this.options.value.app + '/navbar'));
icons.push('<img src="'+this.egw().image(app_icon)+'" title="'+this.egw().lang(this.options.value.app)+'"/>');
}
if(this.options.value.priority == 3)
{