From d6dfaaab8156fd317a5fb23ef268f5f5439033cb Mon Sep 17 00:00:00 2001 From: ralf Date: Sat, 27 Jul 2024 12:52:14 +0200 Subject: [PATCH] suppress tooltip / statustext / title on mobile devices --- api/js/etemplate/Et2Avatar/Et2LAvatar.ts | 2 +- api/js/etemplate/Et2Email/Et2Email.ts | 2 +- api/js/etemplate/Et2Url/Et2UrlEmailReadonly.ts | 2 +- api/js/etemplate/et2_widget_toolbar.ts | 2 +- api/js/jsapi/egw_tooltip.js | 5 ++--- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/api/js/etemplate/Et2Avatar/Et2LAvatar.ts b/api/js/etemplate/Et2Avatar/Et2LAvatar.ts index 27c8e03b35..483f406bcb 100644 --- a/api/js/etemplate/Et2Avatar/Et2LAvatar.ts +++ b/api/js/etemplate/Et2Avatar/Et2LAvatar.ts @@ -84,7 +84,7 @@ export class Et2LAvatar extends Et2Avatar let label = (this.egw().preference("account_display", "common") || "firstname").includes("first") || !this.lname || !this.fname ? this.fname + " " + this.lname : this.lname + ", " + this.fname; - if(label != this.statustext) + if(label != this.statustext && !egwIsMobile()) { this.statustext = label.trim(); } diff --git a/api/js/etemplate/Et2Email/Et2Email.ts b/api/js/etemplate/Et2Email/Et2Email.ts index 99ec8093c5..41226a1add 100644 --- a/api/js/etemplate/Et2Email/Et2Email.ts +++ b/api/js/etemplate/Et2Email/Et2Email.ts @@ -1265,7 +1265,7 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI super.value = value); diff --git a/api/js/etemplate/et2_widget_toolbar.ts b/api/js/etemplate/et2_widget_toolbar.ts index 8e84d23cff..ac547937bf 100644 --- a/api/js/etemplate/et2_widget_toolbar.ts +++ b/api/js/etemplate/et2_widget_toolbar.ts @@ -660,7 +660,7 @@ export class et2_toolbar extends et2_DOMWidget implements et2_IInput if (action.caption) { - widget.statustext = action.caption; + if (!egwIsMobile()) widget.statustext = action.caption; if ((this.countActions <= parseInt(this.view_range) || this.preference[action.id] || !action.iconUrl) && !(isCheckbox && isToggleSwitch)) // no caption for slideswitch checkboxes diff --git a/api/js/jsapi/egw_tooltip.js b/api/js/jsapi/egw_tooltip.js index 25ee253e59..a6c8a5ea17 100644 --- a/api/js/jsapi/egw_tooltip.js +++ b/api/js/jsapi/egw_tooltip.js @@ -178,7 +178,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd) var options = {...optionsDefault, ...(_options||{})}; _elem = jQuery(_elem); - if (_html != '') + if (_html && !egwIsMobile()) { _elem.bind('mouseenter.tooltip', function(e) { if (_elem != current_elem) @@ -263,5 +263,4 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd) } }; -}); - +}); \ No newline at end of file