|
|
|
@ -17,7 +17,7 @@
|
|
|
|
|
text: item.text, |
|
|
|
|
icon: item.icon, |
|
|
|
|
cls: item.cls, |
|
|
|
|
iconCls1: item.iconCls1,
|
|
|
|
|
iconCls1: item.iconCls1, |
|
|
|
|
value: item.value |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
}); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Created by roy on 15/8/14. |
|
|
|
|
*/ |
|
|
|
@ -41,16 +41,17 @@
|
|
|
|
|
container: null, |
|
|
|
|
stopPropagation: false, |
|
|
|
|
el: {}, |
|
|
|
|
popup: {}, |
|
|
|
|
minWidth: 140, |
|
|
|
|
maxHeight: 1000, |
|
|
|
|
destroyWhenHide: false |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.DownListCombo.superclass._init.apply(this, arguments); |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.downlistcombo = BI.createWidget({ |
|
|
|
|
element: this, |
|
|
|
|
type: "bi.combo", |
|
|
|
@ -63,12 +64,13 @@
|
|
|
|
|
belowMouse: o.belowMouse, |
|
|
|
|
stopPropagation: o.stopPropagation, |
|
|
|
|
destroyWhenHide: o.destroyWhenHide, |
|
|
|
|
el: BI.createWidget(o.el, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_trigger", |
|
|
|
|
extraCls: o.iconCls, |
|
|
|
|
width: o.width, |
|
|
|
|
height: o.height |
|
|
|
|
}), |
|
|
|
|
height: o.height, |
|
|
|
|
...o.el |
|
|
|
|
}, |
|
|
|
|
popup: { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.down_list_popup", |
|
|
|
@ -94,39 +96,40 @@
|
|
|
|
|
}, |
|
|
|
|
stopPropagation: o.stopPropagation, |
|
|
|
|
maxHeight: o.maxHeight, |
|
|
|
|
minWidth: o.minWidth |
|
|
|
|
minWidth: o.minWidth, |
|
|
|
|
...o.popup |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { |
|
|
|
|
self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hideView: function () { |
|
|
|
|
this.downlistcombo.hideView(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showView: function (e) { |
|
|
|
|
this.downlistcombo.showView(e); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
|
this.popupView.populate(items); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
this.popupView.setValue(v); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
|
return this.popupView.getValue(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adjustWidth: function () { |
|
|
|
|
this.downlistcombo.adjustWidth(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adjustHeight: function () { |
|
|
|
|
this.downlistcombo.adjustHeight(); |
|
|
|
|
} |
|
|
|
@ -134,6 +137,6 @@
|
|
|
|
|
BI.DownListCombo.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
|
BI.DownListCombo.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; |
|
|
|
|
BI.DownListCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.down_list_combo", BI.DownListCombo); |
|
|
|
|
}()); |
|
|
|
|