Code
function _uComboBox(b, h, a, g, f) {
this.constructor = _uComboBox;
this.name = b;
this.obj = h && h.tagName ? h : document.getElementById(h);
if (!this.obj) {
return null
}
this.props = $.extend({
design: "std",
readonly: false,
noicons: -1,
deficon: null,
listwidth: "auto",
maxlistheight: "auto",
colwidth: null,
onchange: null,
wnd: null,
rtl: 0
}, a || {});this.app = this.props.wnd && this.props.wnd.app ? this.props.wnd.app : null;this.textvals = g > 0 ? g : 0;this.tablecols = g <= 0 ? 1 : g;this.colwidth = this.props.colwidth || [];this.destroyed = false;this.design = this.props.design && _uComboBox.designs[this.props.design] ? _uComboBox.designs[this.props.design] : _uComboBox.designs.std;this.idx = _uComboBox.nextidx++;_uComboBox.all[this.idx] = this;this.data = [];
if (!f) {
f = []
}
var e = -1;
for (var c = 0; c ')[0];this.obj.removeAttribute("name");if(this.obj.form){this.obj.form.appendChild(this.valobj)}if(e<0||e>=f.length){e=0}}else{this.obj.readOnly=false;this.valobj=this.obj;if(e<0||e>=f.length){e=-1}}this.selected=this.userIdx=e;this.changetimer=null;this.haveicons=this.props.noicons>0;if(this.props.noicons<0){for(var c=0;c'; this.frame = document.createElement(d); j.appendChild(this.frame)
}
this.parts = this.design.combo_init(this);$(this.obj).attr("autocomplete", "off").bind("focus", this, _uComboBox._onobjfocus).bind("blur", this, _uComboBox._onobjblur).bind("beforedeactivate", this, _uComboBox._onobjdeact).bind("keydown", this, function (i) {
return i.data.onkeydown(i)
}).bind("keyup", this, function (i) {
return i.data.onkeyup(i)
});$(this.combo).bind("mousedown", this, _uComboBox._oncombomousedown);$(this.toplist).bind("mousedown", this, _uComboBox._onlistmousedown);
for (var c = 0; c = 0) {
this.select(e, false, true)
}
}