From fa683b5e3197192857b9198cf5dcc58151d60fe3 Mon Sep 17 00:00:00 2001 From: Alexandros Sigalas Date: Wed, 9 Dec 2020 22:51:21 +0200 Subject: [PATCH] Added tooltip in multiselect selectbox widget --- api/js/etemplate/et2_widget_selectbox.js | 7 ++++++- api/js/etemplate/et2_widget_selectbox.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index a1fbf48b6e..3794d3464e 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -24,6 +24,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +exports.et2_menulist = exports.et2_selectbox_ro = exports.et2_selectbox = void 0; /*egw:uses /vendor/bower-asset/jquery/dist/jquery.js; /api/js/jquery/chosen/chosen.jquery.js; @@ -271,7 +272,11 @@ var et2_selectbox = /** @class */ (function (_super) { .addClass('cat_' + _value); } } - label.append(jQuery("" + _label + "")); + //added tooltip to multiselect + if (typeof _title == "undefined") { + _title = _label; + } + label.append(jQuery("" + _label + "")); var li = jQuery(document.createElement("li")).append(label); if (this.options.value_class != '') li.addClass(this.options.value_class + _value); diff --git a/api/js/etemplate/et2_widget_selectbox.ts b/api/js/etemplate/et2_widget_selectbox.ts index 22798c65e7..604018907e 100644 --- a/api/js/etemplate/et2_widget_selectbox.ts +++ b/api/js/etemplate/et2_widget_selectbox.ts @@ -395,7 +395,12 @@ export class et2_selectbox extends et2_inputWidget .addClass('cat_' + _value); } } - label.append(jQuery(""+_label+"")); + //added tooltip to multiselect + if(typeof _title == "undefined") + { + _title = _label; + } + label.append(jQuery(""+_label+"")); var li = jQuery(document.createElement("li")).append(label); if (this.options.value_class !='') li.addClass(this.options.value_class+_value); li.appendTo(dom_element || this.multiOptions);