iapyang 7 years ago
parent
commit
7f5e5a2514
  1. 10
      dist/_fineui.min.js
  2. 30
      dist/bundle.js
  3. 12
      dist/bundle.min.js
  4. 30
      dist/fineui.js
  5. 10
      dist/fineui.min.js
  6. 30
      dist/widget.js
  7. 12
      src/widget/singleselect/singleselect.combo.js
  8. 12
      src/widget/singleselect/singleselect.loader.js
  9. 3
      src/widget/singleselect/trigger/searcher.singleselect.js

10
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.js vendored

@ -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 + ""));

12
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui.js vendored

@ -104311,11 +104311,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()) {
@ -104328,7 +104328,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.populate(); self.populate();
self._setStartValue(""); self._setStartValue();
}); });
} }
}); });
@ -104341,7 +104341,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();
@ -104452,9 +104452,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 || []);
@ -104858,20 +104856,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);
@ -104913,16 +104911,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);
}, },
@ -104953,7 +104949,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
@ -105644,8 +105641,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 + ""));

10
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/widget.js vendored

@ -16510,11 +16510,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()) {
@ -16527,7 +16527,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.populate(); self.populate();
self._setStartValue(""); self._setStartValue();
}); });
} }
}); });
@ -16540,7 +16540,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();
@ -16651,9 +16651,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 || []);
@ -17057,20 +17055,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);
@ -17112,16 +17110,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);
}, },
@ -17152,7 +17148,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
@ -17843,8 +17840,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 + ""));

12
src/widget/singleselect/singleselect.combo.js

@ -52,11 +52,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()) {
@ -69,7 +69,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.populate(); self.populate();
self._setStartValue(""); self._setStartValue();
}); });
} }
}); });
@ -82,7 +82,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();
@ -193,9 +193,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 || []);

12
src/widget/singleselect/singleselect.loader.js

@ -55,20 +55,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);
@ -110,16 +110,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);
}, },

3
src/widget/singleselect/trigger/searcher.singleselect.js

@ -110,8 +110,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 + ""));

Loading…
Cancel
Save