From a81dfdcfd8c7e251528b0318d96c48ec575176b9 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 10 May 2021 11:00:41 -0600 Subject: [PATCH] Etemplate: Fix links with title provided always displayed loading spinner --- api/js/etemplate/et2_widget_link.js | 8 +++++--- api/js/etemplate/et2_widget_link.ts | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api/js/etemplate/et2_widget_link.js b/api/js/etemplate/et2_widget_link.js index 82683fad0f..2fb647a5e2 100644 --- a/api/js/etemplate/et2_widget_link.js +++ b/api/js/etemplate/et2_widget_link.js @@ -1373,10 +1373,12 @@ var et2_link_string = /** @class */ (function (_super) { } e.stopImmediatePropagation(); }); - if (_link_data.title) - link.text(_link_data.title); + if (_link_data.title) { + link.text(_link_data.title) + .removeClass("loading"); + } // Now that link is created, get title from server & update - if (!_link_data.title) { + else { this.egw().link_title(_link_data.app, _link_data.id, function (title) { if (title) this.removeClass("loading").text(title); diff --git a/api/js/etemplate/et2_widget_link.ts b/api/js/etemplate/et2_widget_link.ts index 1fb3d2af59..1ba2da15df 100644 --- a/api/js/etemplate/et2_widget_link.ts +++ b/api/js/etemplate/et2_widget_link.ts @@ -1694,10 +1694,13 @@ export class et2_link_string extends expose(class et2_link_string extends et2_va e.stopImmediatePropagation(); }); - if(_link_data.title) link.text(_link_data.title); - + if(_link_data.title) + { + link.text(_link_data.title) + .removeClass("loading"); + } // Now that link is created, get title from server & update - if(!_link_data.title) + else { this.egw().link_title(_link_data.app, _link_data.id, function(title) { if (title)