|
|
@ -104068,11 +104068,11 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () { |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () { |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(); |
|
|
|
this.getSearcher().setValue(self.storeValue); |
|
|
|
this.getSearcher().setValue(self.storeValue); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () { |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () { |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () { |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () { |
|
|
|
if (this.getSearcher().hasMatched()) { |
|
|
|
if (this.getSearcher().hasMatched()) { |
|
|
@ -104085,7 +104085,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { |
|
|
|
self._setStartValue(keyword); |
|
|
|
self._setStartValue(keyword); |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
|
self.populate(); |
|
|
|
self.populate(); |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -104098,7 +104098,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { |
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
|
self.combo.populate(); |
|
|
|
self.combo.populate(); |
|
|
|
self._setStartValue(""); |
|
|
|
self._setStartValue(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
self.combo.setValue(self.storeValue); |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
@ -104209,9 +104209,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { |
|
|
|
this.combo.hideView(); |
|
|
|
this.combo.hideView(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_assertValue: function (val) { |
|
|
|
_assertValue: function (val) {}, |
|
|
|
val || (val = ""); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_makeMap: function (values) { |
|
|
|
_makeMap: function (values) { |
|
|
|
return BI.makeObject(values || []); |
|
|
|
return BI.makeObject(values || []); |
|
|
@ -104615,20 +104613,20 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, { |
|
|
|
}, opts.el), |
|
|
|
}, opts.el), |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
var startValue = self._startValue; |
|
|
|
var startValue = self._startValue; |
|
|
|
self.storeValue && (op = BI.extend(op || {}, { |
|
|
|
BI.isNotNull(self.storeValue) && (op = BI.extend(op || {}, { |
|
|
|
selectedValues: [self.storeValue] |
|
|
|
selectedValues: [self.storeValue] |
|
|
|
})); |
|
|
|
})); |
|
|
|
opts.itemsCreator(op, function (ob) { |
|
|
|
opts.itemsCreator(op, function (ob) { |
|
|
|
hasNext = ob.hasNext; |
|
|
|
hasNext = ob.hasNext; |
|
|
|
var firstItems = []; |
|
|
|
var firstItems = []; |
|
|
|
if (op.times === 1 && self.storeValue) { |
|
|
|
if (op.times === 1 && BI.isNotNull(self.storeValue)) { |
|
|
|
var json = BI.map([self.storeValue], function (i, v) { |
|
|
|
var json = BI.map([self.storeValue], function (i, v) { |
|
|
|
var txt = opts.valueFormatter(v) || v; |
|
|
|
var txt = opts.valueFormatter(v) || v; |
|
|
|
return { |
|
|
|
return { |
|
|
|
text: txt, |
|
|
|
text: txt, |
|
|
|
value: v, |
|
|
|
value: v, |
|
|
|
title: txt, |
|
|
|
title: txt, |
|
|
|
selected: false |
|
|
|
selected: true |
|
|
|
}; |
|
|
|
}; |
|
|
|
}); |
|
|
|
}); |
|
|
|
firstItems = self._createItems(json); |
|
|
|
firstItems = self._createItems(json); |
|
|
@ -104670,16 +104668,14 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, { |
|
|
|
}, 30); |
|
|
|
}, 30); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_assertValue: function (val) { |
|
|
|
_assertValue: function (val) {}, |
|
|
|
val || (val = ""); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setStartValue: function (v) { |
|
|
|
setStartValue: function (v) { |
|
|
|
this._startValue = v; |
|
|
|
this._startValue = v; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
this.storeValue = v || ""; |
|
|
|
this.storeValue = v; |
|
|
|
this._assertValue(this.storeValue); |
|
|
|
this._assertValue(this.storeValue); |
|
|
|
this.button_group.setValue(this.storeValue); |
|
|
|
this.button_group.setValue(this.storeValue); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -104710,7 +104706,8 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
BI.SingleSelectLoader.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
BI.SingleSelectLoader.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
BI.shortcut("bi.single_select_loader", BI.SingleSelectLoader);/** |
|
|
|
BI.shortcut("bi.single_select_loader", BI.SingleSelectLoader); |
|
|
|
|
|
|
|
/** |
|
|
|
* 带加载的单选下拉面板 |
|
|
|
* 带加载的单选下拉面板 |
|
|
|
* @class BI.SingleSelectPopupView |
|
|
|
* @class BI.SingleSelectPopupView |
|
|
|
* @extends Widget |
|
|
|
* @extends Widget |
|
|
@ -105401,8 +105398,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
setState: function (v) { |
|
|
|
setState: function (v) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
v || (v = ""); |
|
|
|
if (BI.isNull(v)) { |
|
|
|
if (v === "") { |
|
|
|
|
|
|
|
this.editor.setState(BI.Selection.None); |
|
|
|
this.editor.setState(BI.Selection.None); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.editor.setState(o.valueFormatter(v + "") || (v + "")); |
|
|
|
this.editor.setState(o.valueFormatter(v + "") || (v + "")); |
|
|
|