|
|
@ -7,6 +7,10 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.SingleSelectList = BI.inherit(BI.Widget, { |
|
|
|
BI.SingleSelectList = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_constants: { |
|
|
|
|
|
|
|
itemHeight: 24 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-select-list", |
|
|
|
baseCls: "bi-select-list", |
|
|
@ -61,7 +65,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, { |
|
|
|
items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, { |
|
|
|
items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, { |
|
|
|
type: "bi.single_select_item", |
|
|
|
type: "bi.single_select_item", |
|
|
|
cls: "bi-list-item-active", |
|
|
|
cls: "bi-list-item-active", |
|
|
|
height: 24, |
|
|
|
height: this._constants.itemHeight, |
|
|
|
forceNotSelected: true, |
|
|
|
forceNotSelected: true, |
|
|
|
text: BI.i18nText("BI-Basic_No_Select"), |
|
|
|
text: BI.i18nText("BI-Basic_No_Select"), |
|
|
|
ref: function (_ref) { |
|
|
|
ref: function (_ref) { |
|
|
@ -116,7 +120,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
resetHeight: function (h) { |
|
|
|
resetHeight: function (h) { |
|
|
|
this.list.resetHeight ? this.list.resetHeight(h) : |
|
|
|
this.list.resetHeight ? this.list.resetHeight(h) : |
|
|
|
this.list.element.css({"max-height": h / BI.pixRatio + BI.pixUnit}); |
|
|
|
this.list.element.css({"max-height": (h - (this.options.allowNoSelect ? this._constants.itemHeight : 0)) / BI.pixRatio + BI.pixUnit}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setNotSelectedValue: function () { |
|
|
|
setNotSelectedValue: function () { |
|
|
|