Browse Source

Merge pull request #374 in FUI/fineui from ~TELLER/fineui:bugfix/BI-18958 to master

* commit '9faa34164c30f899624d583de254851e91623be5':
  update
  udpate
es6
guy 7 years ago
parent
commit
2a92211a79
  1. 29
      dist/bundle.js
  2. 29
      dist/fineui.js
  3. 29
      dist/widget.js
  4. 29
      src/widget/singleselect/singleselectlist.insert.js

29
dist/bundle.js vendored

@ -104795,7 +104795,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments); BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.storeValue = o.value || {}; this.storeValue = o.value;
var assertShowValue = function () { var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -104851,14 +104851,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START, eventName: BI.Searcher.EVENT_START,
action: function () { action: function () {
self._showSearcherPane(); self._showSearcherPane();
self._setStartValue(""); self._setStartValue();
this.setValue(BI.deepClone(self.storeValue)); this.setValue(BI.deepClone(self.storeValue));
} }
}, { }, {
eventName: BI.Searcher.EVENT_STOP, eventName: BI.Searcher.EVENT_STOP,
action: function () { action: function () {
self._showAdapter(); self._showAdapter();
self._setStartValue(""); self._setStartValue();
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面 // 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate(); self.adapter.populate();
@ -104880,7 +104880,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}); });
} else { } else {
@ -104907,7 +104907,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
} else { } else {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -104917,18 +104917,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
} }
}, { }, {
eventName: BI.Searcher.EVENT_CHANGE, eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) { action: function () {
if (obj instanceof BI.MultiSelectBar) { self.storeValue = this.getValue();
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
} }
}] }]
}); });
@ -104971,9 +104962,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing(); this.trigger.stopEditing();
}, },
_assertValue: function (val) { _assertValue: function () {},
val || (val = "");
},
_makeMap: function (values) { _makeMap: function (values) {
return BI.makeObject(values || []); return BI.makeObject(values || []);
@ -105081,7 +105070,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView(); // this.trigger.adjustView();
}, },
setValue: function (v) { setValue: function (v) {
this.storeValue = v || ""; this.storeValue = v;
this.adapter.setValue(this.storeValue); this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue); this.trigger.setValue(this.storeValue);
}, },

29
dist/fineui.js vendored

@ -105038,7 +105038,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments); BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.storeValue = o.value || {}; this.storeValue = o.value;
var assertShowValue = function () { var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -105094,14 +105094,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START, eventName: BI.Searcher.EVENT_START,
action: function () { action: function () {
self._showSearcherPane(); self._showSearcherPane();
self._setStartValue(""); self._setStartValue();
this.setValue(BI.deepClone(self.storeValue)); this.setValue(BI.deepClone(self.storeValue));
} }
}, { }, {
eventName: BI.Searcher.EVENT_STOP, eventName: BI.Searcher.EVENT_STOP,
action: function () { action: function () {
self._showAdapter(); self._showAdapter();
self._setStartValue(""); self._setStartValue();
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面 // 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate(); self.adapter.populate();
@ -105123,7 +105123,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}); });
} else { } else {
@ -105150,7 +105150,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
} else { } else {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -105160,18 +105160,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
} }
}, { }, {
eventName: BI.Searcher.EVENT_CHANGE, eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) { action: function () {
if (obj instanceof BI.MultiSelectBar) { self.storeValue = this.getValue();
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
} }
}] }]
}); });
@ -105214,9 +105205,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing(); this.trigger.stopEditing();
}, },
_assertValue: function (val) { _assertValue: function () {},
val || (val = "");
},
_makeMap: function (values) { _makeMap: function (values) {
return BI.makeObject(values || []); return BI.makeObject(values || []);
@ -105324,7 +105313,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView(); // this.trigger.adjustView();
}, },
setValue: function (v) { setValue: function (v) {
this.storeValue = v || ""; this.storeValue = v;
this.adapter.setValue(this.storeValue); this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue); this.trigger.setValue(this.storeValue);
}, },

29
dist/widget.js vendored

@ -17326,7 +17326,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments); BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.storeValue = o.value || {}; this.storeValue = o.value;
var assertShowValue = function () { var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -17382,14 +17382,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START, eventName: BI.Searcher.EVENT_START,
action: function () { action: function () {
self._showSearcherPane(); self._showSearcherPane();
self._setStartValue(""); self._setStartValue();
this.setValue(BI.deepClone(self.storeValue)); this.setValue(BI.deepClone(self.storeValue));
} }
}, { }, {
eventName: BI.Searcher.EVENT_STOP, eventName: BI.Searcher.EVENT_STOP,
action: function () { action: function () {
self._showAdapter(); self._showAdapter();
self._setStartValue(""); self._setStartValue();
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面 // 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate(); self.adapter.populate();
@ -17411,7 +17411,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}); });
} else { } else {
@ -17438,7 +17438,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
} else { } else {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -17448,18 +17448,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
} }
}, { }, {
eventName: BI.Searcher.EVENT_CHANGE, eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) { action: function () {
if (obj instanceof BI.MultiSelectBar) { self.storeValue = this.getValue();
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
} }
}] }]
}); });
@ -17502,9 +17493,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing(); this.trigger.stopEditing();
}, },
_assertValue: function (val) { _assertValue: function () {},
val || (val = "");
},
_makeMap: function (values) { _makeMap: function (values) {
return BI.makeObject(values || []); return BI.makeObject(values || []);
@ -17612,7 +17601,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView(); // this.trigger.adjustView();
}, },
setValue: function (v) { setValue: function (v) {
this.storeValue = v || ""; this.storeValue = v;
this.adapter.setValue(this.storeValue); this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue); this.trigger.setValue(this.storeValue);
}, },

29
src/widget/singleselect/singleselectlist.insert.js

@ -15,7 +15,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList.superclass._init.apply(this, arguments); BI.SingleSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.storeValue = o.value || {}; this.storeValue = o.value;
var assertShowValue = function () { var assertShowValue = function () {
BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue);
@ -71,14 +71,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
eventName: BI.Searcher.EVENT_START, eventName: BI.Searcher.EVENT_START,
action: function () { action: function () {
self._showSearcherPane(); self._showSearcherPane();
self._setStartValue(""); self._setStartValue();
this.setValue(BI.deepClone(self.storeValue)); this.setValue(BI.deepClone(self.storeValue));
} }
}, { }, {
eventName: BI.Searcher.EVENT_STOP, eventName: BI.Searcher.EVENT_STOP,
action: function () { action: function () {
self._showAdapter(); self._showAdapter();
self._setStartValue(""); self._setStartValue();
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
// 需要刷新回到初始界面,否则搜索的结果不能放在最前面 // 需要刷新回到初始界面,否则搜索的结果不能放在最前面
self.adapter.populate(); self.adapter.populate();
@ -100,7 +100,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self._setStartValue(keyword); self._setStartValue(keyword);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
}); });
} else { } else {
@ -127,7 +127,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
self.adapter.populate(); self.adapter.populate();
self._setStartValue(""); self._setStartValue();
} else { } else {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -137,18 +137,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
} }
}, { }, {
eventName: BI.Searcher.EVENT_CHANGE, eventName: BI.Searcher.EVENT_CHANGE,
action: function (value, obj) { action: function () {
if (obj instanceof BI.MultiSelectBar) { self.storeValue = this.getValue();
self._joinAll(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
} else {
self._join(this.getValue(), function () {
assertShowValue();
self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);
});
}
} }
}] }]
}); });
@ -191,9 +182,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
this.trigger.stopEditing(); this.trigger.stopEditing();
}, },
_assertValue: function (val) { _assertValue: function () {},
val || (val = "");
},
_makeMap: function (values) { _makeMap: function (values) {
return BI.makeObject(values || []); return BI.makeObject(values || []);
@ -301,7 +290,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
// this.trigger.adjustView(); // this.trigger.adjustView();
}, },
setValue: function (v) { setValue: function (v) {
this.storeValue = v || ""; this.storeValue = v;
this.adapter.setValue(this.storeValue); this.adapter.setValue(this.storeValue);
this.trigger.setValue(this.storeValue); this.trigger.setValue(this.storeValue);
}, },

Loading…
Cancel
Save