Etemplate: Fix missing tooltip on toolbar checkboxes

This commit is contained in:
nathangray 2021-03-03 08:53:19 -07:00
parent 230c5ccbcd
commit 4d9a30a041
2 changed files with 3 additions and 3 deletions

View File

@ -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 + ')');
}

View File

@ -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 + ')');