diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index 3794d3464e..32b696ee94 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -24,7 +24,6 @@ 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; @@ -185,6 +184,16 @@ var et2_selectbox = /** @class */ (function (_super) { } return valid; }; + /** + * Overridden from parent to make sure tooltip handler is bound to the correct element + * if tags is on. + */ + et2_selectbox.prototype.getTooltipElement = function () { + if (this.input && (this.options.tags || this.options.search)) { + return jQuery(this.input.siblings()).get(0); + } + return this.getDOMNode(this); + }; /** * Add an option to regular drop-down select * @@ -617,6 +626,10 @@ var et2_selectbox = /** @class */ (function (_super) { jQuery(v).addClass(self.options.value_class + v.value); }); } + this.input.on('liszt:ready', function (evt, params) { + debugger; + this.set_statustext(this.statustext); + }.bind(this)); this.input.chosen({ inherit_select_classes: true, search_contains: true, diff --git a/api/js/etemplate/et2_widget_selectbox.ts b/api/js/etemplate/et2_widget_selectbox.ts index 604018907e..0b840b9372 100644 --- a/api/js/etemplate/et2_widget_selectbox.ts +++ b/api/js/etemplate/et2_widget_selectbox.ts @@ -288,6 +288,20 @@ export class et2_selectbox extends et2_inputWidget return valid; } + /** + * Overridden from parent to make sure tooltip handler is bound to the correct element + * if tags is on. + */ + getTooltipElement(): HTMLElement + { + if(this.input && (this.options.tags || this.options.search)) + { + return jQuery(this.input.siblings()).get(0); + } + return this.getDOMNode(this); + } + + /** * Add an option to regular drop-down select * @@ -834,6 +848,10 @@ export class et2_selectbox extends et2_inputWidget jQuery(v).addClass(self.options.value_class+v.value); }); } + this.input.on('liszt:ready', function(evt, params) { + debugger; + this.set_statustext(this.statustext); + }.bind(this)); this.input.chosen({ inherit_select_classes: true, search_contains: true, @@ -868,7 +886,6 @@ export class et2_selectbox extends et2_inputWidget self.change.call(self, self.input, self, _change); }); } - // multi selection with limited show line of single row if (this.options.multiple && this.options.rows == 1 && this.options.height) {