Merge pull request #99 from asig2016/20.1_add_tooltip_tomultiselect_widget

Added tooltip in multiselect selectbox widget
This commit is contained in:
Nathan Gray 2020-12-10 09:01:41 -07:00 committed by GitHub
commit 2056b811a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -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("<span>" + _label + "</span>"));
//added tooltip to multiselect
if (typeof _title == "undefined") {
_title = _label;
}
label.append(jQuery("<span title='" + _title + "'>" + _label + "</span>"));
var li = jQuery(document.createElement("li")).append(label);
if (this.options.value_class != '')
li.addClass(this.options.value_class + _value);

View File

@ -395,7 +395,12 @@ export class et2_selectbox extends et2_inputWidget
.addClass('cat_' + _value);
}
}
label.append(jQuery("<span>"+_label+"</span>"));
//added tooltip to multiselect
if(typeof _title == "undefined")
{
_title = _label;
}
label.append(jQuery("<span title='"+_title+"'>"+_label+"</span>"));
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);