From da914ec5c9bdd54d8b91d4b17b3bd02726e984f2 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 22 May 2018 11:32:51 +0800 Subject: [PATCH] update --- dist/bundle.js | 61 +++++++++++++++++++++----------------------------- dist/fineui.js | 61 +++++++++++++++++++++----------------------------- dist/widget.js | 61 +++++++++++++++++++++----------------------------- 3 files changed, 78 insertions(+), 105 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 3e2257caa0..e0a8727786 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -97841,23 +97841,23 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { self._setStartValue(""); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { - if (this.getSearcher().hasMatched()) { - var keyword = this.getSearcher().getKeyword(); - self._join({ - type: BI.Selection.Multi, - value: [keyword] - }, function () { - // 如果在不选的状态下直接把该值添加进来 - if (self.storeValue.type === BI.Selection.Multi) { - self.storeValue.value.pushDistinct(keyword); - } - self.combo.setValue(self.storeValue); - self._setStartValue(keyword); - assertShowValue(); - self.populate(); - self._setStartValue(""); - }); - } + // if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self._join({ + type: BI.Selection.Multi, + value: [keyword] + }, function () { + // 如果在不选的状态下直接把该值添加进来 + if (self.storeValue.type === BI.Selection.Multi) { + self.storeValue.value.pushDistinct(keyword); + } + self.combo.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(""); + }); + // } }); this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { var last = BI.last(keywords); @@ -99374,17 +99374,6 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { height: this.constants.height }); - this.addNotMatchTip = BI.createWidget({ - type: "bi.icon_text_item", - invisible: true, - text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""), - cls: "text-add-tip-font", - height: this.constants.height, - handler: function () { - self.fireEvent(BI.MultiSelectSearchPane.EVENT_ADD_ITEM, o.keywordGetter()); - } - }); - this.loader = BI.createWidget({ type: "bi.multi_select_search_loader", keywordGetter: o.keywordGetter, @@ -99405,20 +99394,23 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { type: "bi.vtape", element: this, items: [{ - type: "bi.center_adapt", - items: [this.tooltipClick, this.addNotMatchTip], - height: this.constants.height + el: this.tooltipClick, + height: 0 }, { el: this.loader }] }); + this.tooltipClick.setVisible(false); }, setKeyword: function (keyword) { var btn; - var isMatchTipVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue()); - this.tooltipClick.setVisible(isMatchTipVisible); - this.addNotMatchTip.setVisible(!isMatchTipVisible); + var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue()); + if (isVisible !== this.tooltipClick.isVisible()) { + this.tooltipClick.setVisible(isVisible); + this.resizer.attr("items")[0].height = (isVisible ? this.constants.height : 0); + this.resizer.resize(); + } }, isAllSelected: function () { @@ -99447,7 +99439,6 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { }); BI.MultiSelectSearchPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiSelectSearchPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; BI.shortcut("bi.multi_select_search_pane", BI.MultiSelectSearchPane);/** * 查看已选按钮 diff --git a/dist/fineui.js b/dist/fineui.js index 42aac08277..b947175774 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -98084,23 +98084,23 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { self._setStartValue(""); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { - if (this.getSearcher().hasMatched()) { - var keyword = this.getSearcher().getKeyword(); - self._join({ - type: BI.Selection.Multi, - value: [keyword] - }, function () { - // 如果在不选的状态下直接把该值添加进来 - if (self.storeValue.type === BI.Selection.Multi) { - self.storeValue.value.pushDistinct(keyword); - } - self.combo.setValue(self.storeValue); - self._setStartValue(keyword); - assertShowValue(); - self.populate(); - self._setStartValue(""); - }); - } + // if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self._join({ + type: BI.Selection.Multi, + value: [keyword] + }, function () { + // 如果在不选的状态下直接把该值添加进来 + if (self.storeValue.type === BI.Selection.Multi) { + self.storeValue.value.pushDistinct(keyword); + } + self.combo.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(""); + }); + // } }); this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { var last = BI.last(keywords); @@ -99617,17 +99617,6 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { height: this.constants.height }); - this.addNotMatchTip = BI.createWidget({ - type: "bi.icon_text_item", - invisible: true, - text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""), - cls: "text-add-tip-font", - height: this.constants.height, - handler: function () { - self.fireEvent(BI.MultiSelectSearchPane.EVENT_ADD_ITEM, o.keywordGetter()); - } - }); - this.loader = BI.createWidget({ type: "bi.multi_select_search_loader", keywordGetter: o.keywordGetter, @@ -99648,20 +99637,23 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { type: "bi.vtape", element: this, items: [{ - type: "bi.center_adapt", - items: [this.tooltipClick, this.addNotMatchTip], - height: this.constants.height + el: this.tooltipClick, + height: 0 }, { el: this.loader }] }); + this.tooltipClick.setVisible(false); }, setKeyword: function (keyword) { var btn; - var isMatchTipVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue()); - this.tooltipClick.setVisible(isMatchTipVisible); - this.addNotMatchTip.setVisible(!isMatchTipVisible); + var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue()); + if (isVisible !== this.tooltipClick.isVisible()) { + this.tooltipClick.setVisible(isVisible); + this.resizer.attr("items")[0].height = (isVisible ? this.constants.height : 0); + this.resizer.resize(); + } }, isAllSelected: function () { @@ -99690,7 +99682,6 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { }); BI.MultiSelectSearchPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiSelectSearchPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; BI.shortcut("bi.multi_select_search_pane", BI.MultiSelectSearchPane);/** * 查看已选按钮 diff --git a/dist/widget.js b/dist/widget.js index e2e6261076..83270dc5f4 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -10274,23 +10274,23 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { self._setStartValue(""); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { - if (this.getSearcher().hasMatched()) { - var keyword = this.getSearcher().getKeyword(); - self._join({ - type: BI.Selection.Multi, - value: [keyword] - }, function () { - // 如果在不选的状态下直接把该值添加进来 - if (self.storeValue.type === BI.Selection.Multi) { - self.storeValue.value.pushDistinct(keyword); - } - self.combo.setValue(self.storeValue); - self._setStartValue(keyword); - assertShowValue(); - self.populate(); - self._setStartValue(""); - }); - } + // if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self._join({ + type: BI.Selection.Multi, + value: [keyword] + }, function () { + // 如果在不选的状态下直接把该值添加进来 + if (self.storeValue.type === BI.Selection.Multi) { + self.storeValue.value.pushDistinct(keyword); + } + self.combo.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(""); + }); + // } }); this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) { var last = BI.last(keywords); @@ -11807,17 +11807,6 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { height: this.constants.height }); - this.addNotMatchTip = BI.createWidget({ - type: "bi.icon_text_item", - invisible: true, - text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""), - cls: "text-add-tip-font", - height: this.constants.height, - handler: function () { - self.fireEvent(BI.MultiSelectSearchPane.EVENT_ADD_ITEM, o.keywordGetter()); - } - }); - this.loader = BI.createWidget({ type: "bi.multi_select_search_loader", keywordGetter: o.keywordGetter, @@ -11838,20 +11827,23 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { type: "bi.vtape", element: this, items: [{ - type: "bi.center_adapt", - items: [this.tooltipClick, this.addNotMatchTip], - height: this.constants.height + el: this.tooltipClick, + height: 0 }, { el: this.loader }] }); + this.tooltipClick.setVisible(false); }, setKeyword: function (keyword) { var btn; - var isMatchTipVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue()); - this.tooltipClick.setVisible(isMatchTipVisible); - this.addNotMatchTip.setVisible(!isMatchTipVisible); + var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue()); + if (isVisible !== this.tooltipClick.isVisible()) { + this.tooltipClick.setVisible(isVisible); + this.resizer.attr("items")[0].height = (isVisible ? this.constants.height : 0); + this.resizer.resize(); + } }, isAllSelected: function () { @@ -11880,7 +11872,6 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { }); BI.MultiSelectSearchPane.EVENT_CHANGE = "EVENT_CHANGE"; -BI.MultiSelectSearchPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; BI.shortcut("bi.multi_select_search_pane", BI.MultiSelectSearchPane);/** * 查看已选按钮