diff --git a/api/js/etemplate/et2_widget_toolbar.js b/api/js/etemplate/et2_widget_toolbar.js index d184433e58..ed2abbbdac 100644 --- a/api/js/etemplate/et2_widget_toolbar.js +++ b/api/js/etemplate/et2_widget_toolbar.js @@ -434,7 +434,6 @@ var et2_toolbar = /** @class */ (function (_super) { .attr('id', this.id + '-' + action.id) .attr('type', 'button') .appendTo(this.preference[action.id] ? this.actionbox.children()[1] : jQuery('[data-group=' + action.group + ']', this.actionlist)); - this.egw().tooltipBind(button, action.hint ? action.hint : action.caption) + (action.shortcut ? ' (' + action.shortcut.caption + ')' : ''); if (action && action.checkbox) { if (action.data.toggle_on || action.data.toggle_off) { var toggle = et2_core_widget_1.et2_createWidget('checkbox', { @@ -456,6 +455,7 @@ var et2_toolbar = /** @class */ (function (_super) { button.addClass('toolbar_toggled' + (typeof action.toggledClass != 'undefined' ? " " + action.toggledClass : '')); } } + this.egw().tooltipBind(button, action.hint ? action.hint : action.caption) + (action.shortcut ? ' (' + action.shortcut.caption + ')' : ''); if (action.iconUrl) { button.attr('style', 'background-image:url(' + action.iconUrl + ')'); } diff --git a/api/js/etemplate/et2_widget_toolbar.ts b/api/js/etemplate/et2_widget_toolbar.ts index 46a12e9bb9..4725fcb006 100644 --- a/api/js/etemplate/et2_widget_toolbar.ts +++ b/api/js/etemplate/et2_widget_toolbar.ts @@ -530,8 +530,6 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput .attr('type', 'button') .appendTo(this.preference[action.id]?this.actionbox.children()[1]:jQuery('[data-group='+action.group+']',this.actionlist)); - this.egw().tooltipBind(button, action.hint ? action.hint : action.caption) + (action.shortcut ? ' ('+action.shortcut.caption+')' : ''); - if (action && action.checkbox) { if (action.data.toggle_on || action.data.toggle_off) @@ -556,6 +554,8 @@ class et2_toolbar extends et2_DOMWidget implements et2_IInput if (this.checkbox(action.id)) button.addClass('toolbar_toggled'+ (typeof action.toggledClass != 'undefined'?" "+action.toggledClass:'')); } } + this.egw().tooltipBind(button, action.hint ? action.hint : action.caption) + (action.shortcut ? ' ('+action.shortcut.caption+')' : ''); + if ( action.iconUrl) { button.attr('style','background-image:url(' + action.iconUrl + ')');