|
|
@ -80,7 +80,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { |
|
|
|
setKeyword: function (keyword) { |
|
|
|
setKeyword: function (keyword) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) { |
|
|
|
var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) { |
|
|
|
return keyword === btn.getValue(); |
|
|
|
return keyword === (o.valueFormatter(btn.getValue()) || btn.getValue()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue; |
|
|
|
var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue; |
|
|
|
this.tooltipClick.setVisible(isMatchTipVisible); |
|
|
|
this.tooltipClick.setVisible(isMatchTipVisible); |
|
|
@ -88,6 +88,20 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { |
|
|
|
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword)); |
|
|
|
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMatchedItemValue: function () { |
|
|
|
|
|
|
|
var value; |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
BI.some(this.loader.getAllButtons(), function (idx, btn) { |
|
|
|
|
|
|
|
var v = btn.getValue(); |
|
|
|
|
|
|
|
if (o.keywordGetter() === (o.valueFormatter(v) || v)) { |
|
|
|
|
|
|
|
value = v; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return value; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
hasMatched: function () { |
|
|
|
hasMatched: function () { |
|
|
|
return this.tooltipClick.isVisible(); |
|
|
|
return this.tooltipClick.isVisible(); |
|
|
|
}, |
|
|
|
}, |
|
|
|