From 975b1b09f52635e348cce8a7f7e50db31f03ce5e Mon Sep 17 00:00:00 2001 From: iapyang Date: Thu, 3 May 2018 17:08:24 +0800 Subject: [PATCH 1/2] udpate --- dist/bundle.js | 17 ++++------------- dist/fineui.js | 17 ++++------------- dist/widget.js | 17 ++++------------- .../singleselect/singleselectlist.insert.js | 17 ++++------------- 4 files changed, 16 insertions(+), 52 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 43eda71da..a4732d2c1 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -104787,7 +104787,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { BI.SingleSelectInsertList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.storeValue = o.value || {}; + this.storeValue = o.value; var assertShowValue = function () { BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); @@ -104909,18 +104909,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { } }, { eventName: BI.Searcher.EVENT_CHANGE, - action: function (value, obj) { - if (obj instanceof BI.MultiSelectBar) { - 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); - }); - } + action: function () { + self.storeValue = this.getValue(); + self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); } }] }); diff --git a/dist/fineui.js b/dist/fineui.js index 63034012f..8ce37ba1e 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -105030,7 +105030,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { BI.SingleSelectInsertList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.storeValue = o.value || {}; + this.storeValue = o.value; var assertShowValue = function () { BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); @@ -105152,18 +105152,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { } }, { eventName: BI.Searcher.EVENT_CHANGE, - action: function (value, obj) { - if (obj instanceof BI.MultiSelectBar) { - 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); - }); - } + action: function () { + self.storeValue = this.getValue(); + self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); } }] }); diff --git a/dist/widget.js b/dist/widget.js index a4f5c22fb..b60f95428 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -17326,7 +17326,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { BI.SingleSelectInsertList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.storeValue = o.value || {}; + this.storeValue = o.value; var assertShowValue = function () { BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); @@ -17448,18 +17448,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { } }, { eventName: BI.Searcher.EVENT_CHANGE, - action: function (value, obj) { - if (obj instanceof BI.MultiSelectBar) { - 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); - }); - } + action: function () { + self.storeValue = this.getValue(); + self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); } }] }); diff --git a/src/widget/singleselect/singleselectlist.insert.js b/src/widget/singleselect/singleselectlist.insert.js index c89709f2b..fc2f9e683 100644 --- a/src/widget/singleselect/singleselectlist.insert.js +++ b/src/widget/singleselect/singleselectlist.insert.js @@ -15,7 +15,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { BI.SingleSelectInsertList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.storeValue = o.value || {}; + this.storeValue = o.value; var assertShowValue = function () { BI.isKey(self._startValue) && self.storeValue.value[self.storeValue.type === BI.Selection.All ? "remove" : "pushDistinct"](self._startValue); @@ -137,18 +137,9 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { } }, { eventName: BI.Searcher.EVENT_CHANGE, - action: function (value, obj) { - if (obj instanceof BI.MultiSelectBar) { - 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); - }); - } + action: function () { + self.storeValue = this.getValue(); + self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); } }] }); From 9faa34164c30f899624d583de254851e91623be5 Mon Sep 17 00:00:00 2001 From: iapyang Date: Thu, 3 May 2018 17:11:08 +0800 Subject: [PATCH 2/2] update --- dist/bundle.js | 14 ++++++-------- dist/fineui.js | 14 ++++++-------- dist/widget.js | 14 ++++++-------- src/widget/singleselect/singleselectlist.insert.js | 14 ++++++-------- 4 files changed, 24 insertions(+), 32 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index a4732d2c1..3d17f5d78 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -104843,14 +104843,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { eventName: BI.Searcher.EVENT_START, action: function () { self._showSearcherPane(); - self._setStartValue(""); + self._setStartValue(); this.setValue(BI.deepClone(self.storeValue)); } }, { eventName: BI.Searcher.EVENT_STOP, action: function () { self._showAdapter(); - self._setStartValue(""); + self._setStartValue(); self.adapter.setValue(self.storeValue); // 需要刷新回到初始界面,否则搜索的结果不能放在最前面 self.adapter.populate(); @@ -104872,7 +104872,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self._setStartValue(keyword); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); }); } else { @@ -104899,7 +104899,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self.adapter.setValue(self.storeValue); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); } else { self.adapter.setValue(self.storeValue); assertShowValue(); @@ -104954,9 +104954,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { this.trigger.stopEditing(); }, - _assertValue: function (val) { - val || (val = ""); - }, + _assertValue: function () {}, _makeMap: function (values) { return BI.makeObject(values || []); @@ -105064,7 +105062,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { // this.trigger.adjustView(); }, setValue: function (v) { - this.storeValue = v || ""; + this.storeValue = v; this.adapter.setValue(this.storeValue); this.trigger.setValue(this.storeValue); }, diff --git a/dist/fineui.js b/dist/fineui.js index 8ce37ba1e..ec6271caa 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -105086,14 +105086,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { eventName: BI.Searcher.EVENT_START, action: function () { self._showSearcherPane(); - self._setStartValue(""); + self._setStartValue(); this.setValue(BI.deepClone(self.storeValue)); } }, { eventName: BI.Searcher.EVENT_STOP, action: function () { self._showAdapter(); - self._setStartValue(""); + self._setStartValue(); self.adapter.setValue(self.storeValue); // 需要刷新回到初始界面,否则搜索的结果不能放在最前面 self.adapter.populate(); @@ -105115,7 +105115,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self._setStartValue(keyword); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); }); } else { @@ -105142,7 +105142,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self.adapter.setValue(self.storeValue); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); } else { self.adapter.setValue(self.storeValue); assertShowValue(); @@ -105197,9 +105197,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { this.trigger.stopEditing(); }, - _assertValue: function (val) { - val || (val = ""); - }, + _assertValue: function () {}, _makeMap: function (values) { return BI.makeObject(values || []); @@ -105307,7 +105305,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { // this.trigger.adjustView(); }, setValue: function (v) { - this.storeValue = v || ""; + this.storeValue = v; this.adapter.setValue(this.storeValue); this.trigger.setValue(this.storeValue); }, diff --git a/dist/widget.js b/dist/widget.js index b60f95428..9e534d7df 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -17382,14 +17382,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { eventName: BI.Searcher.EVENT_START, action: function () { self._showSearcherPane(); - self._setStartValue(""); + self._setStartValue(); this.setValue(BI.deepClone(self.storeValue)); } }, { eventName: BI.Searcher.EVENT_STOP, action: function () { self._showAdapter(); - self._setStartValue(""); + self._setStartValue(); self.adapter.setValue(self.storeValue); // 需要刷新回到初始界面,否则搜索的结果不能放在最前面 self.adapter.populate(); @@ -17411,7 +17411,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self._setStartValue(keyword); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); }); } else { @@ -17438,7 +17438,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self.adapter.setValue(self.storeValue); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); } else { self.adapter.setValue(self.storeValue); assertShowValue(); @@ -17493,9 +17493,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { this.trigger.stopEditing(); }, - _assertValue: function (val) { - val || (val = ""); - }, + _assertValue: function () {}, _makeMap: function (values) { return BI.makeObject(values || []); @@ -17603,7 +17601,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { // this.trigger.adjustView(); }, setValue: function (v) { - this.storeValue = v || ""; + this.storeValue = v; this.adapter.setValue(this.storeValue); this.trigger.setValue(this.storeValue); }, diff --git a/src/widget/singleselect/singleselectlist.insert.js b/src/widget/singleselect/singleselectlist.insert.js index fc2f9e683..8aaeab5e9 100644 --- a/src/widget/singleselect/singleselectlist.insert.js +++ b/src/widget/singleselect/singleselectlist.insert.js @@ -71,14 +71,14 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { eventName: BI.Searcher.EVENT_START, action: function () { self._showSearcherPane(); - self._setStartValue(""); + self._setStartValue(); this.setValue(BI.deepClone(self.storeValue)); } }, { eventName: BI.Searcher.EVENT_STOP, action: function () { self._showAdapter(); - self._setStartValue(""); + self._setStartValue(); self.adapter.setValue(self.storeValue); // 需要刷新回到初始界面,否则搜索的结果不能放在最前面 self.adapter.populate(); @@ -100,7 +100,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self._setStartValue(keyword); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); }); } else { @@ -127,7 +127,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { self.adapter.setValue(self.storeValue); assertShowValue(); self.adapter.populate(); - self._setStartValue(""); + self._setStartValue(); } else { self.adapter.setValue(self.storeValue); assertShowValue(); @@ -182,9 +182,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { this.trigger.stopEditing(); }, - _assertValue: function (val) { - val || (val = ""); - }, + _assertValue: function () {}, _makeMap: function (values) { return BI.makeObject(values || []); @@ -292,7 +290,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Widget, { // this.trigger.adjustView(); }, setValue: function (v) { - this.storeValue = v || ""; + this.storeValue = v; this.adapter.setValue(this.storeValue); this.trigger.setValue(this.storeValue); },