fixed same bug

This commit is contained in:
2026-09-30 14:33:11 +07:00
parent bc95edbc0f
commit 8a758e5875
18 changed files with 162 additions and 433 deletions
+5 -7
View File
@@ -39,7 +39,7 @@ var AjaxResolver = (function (_super) {
url: '',
method: 'post',
queryKey: 'Auto_Query',
extraData: {},
param: [],
timeout: 0,
requestThrottling: 500
};
@@ -51,7 +51,7 @@ var AjaxResolver = (function (_super) {
}
var data = {};
data[this._settings.queryKey] = q;
$.extend(data, this._settings.extraData);
if (this._settings.param.length > 0) $.extend(data, FoniaJS.RequestParam(this._settings.param));
if (this.requestTID) {
window.clearTimeout(this.requestTID);
}
@@ -97,13 +97,12 @@ var DropdownV5 = (function () {
DropdownV5.prototype.init = function () {
var _this = this;
var pos = this.getElPos();
var fontsize = _this._$el.css('font-size');
this._dd = $('<div />');
this._dd.addClass('bootstrap-autocomplete dropdown-menu');
this._dd.insertAfter(this._$el);
this._dd.css({ top: pos.top + this._$el.outerHeight(), left: pos.left, width: this._$el.outerWidth() });
this._dd.css({ top: pos.top + this._$el.outerHeight(), left: pos.left, width: this._$el.outerWidth(), 'font-size': fontsize });
this._dd.on('click', '.dropdown-item', function (evt) {
//console.log('clicked', evt.currentTarget);
//console.log($(evt.currentTarget));
var item = $(evt.currentTarget).data('item');
_this.itemSelectedLaunchEvent(item);
evt.preventDefault();
@@ -239,8 +238,7 @@ var DropdownV5 = (function () {
itemText = _this.showMatchedText(itemFormatted.text, _this.searchText);
if (itemFormatted.html !== undefined) {
itemHtml = itemFormatted.html;
}
else {
} else {
itemHtml = itemText;
}
var disabledItem = itemFormatted.disabled;