|
|
|
@ -105,7 +105,11 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
|
|
|
|
|
}, { |
|
|
|
|
eventName: BI.Searcher.EVENT_PAUSE, |
|
|
|
|
action: function () { |
|
|
|
|
var keyword = this.getKeyword(); |
|
|
|
|
var keywords = self._getKeywords(); |
|
|
|
|
if (keywords[keywords.length - 1] === BI.BlankSplitChar) { |
|
|
|
|
keywords = keywords.slice(0, keywords.length - 1); |
|
|
|
|
} |
|
|
|
|
var keyword = BI.isEmptyArray(keywords) ? "" : keywords[keywords.length - 1]; |
|
|
|
|
self._join({ |
|
|
|
|
type: BI.Selection.Multi, |
|
|
|
|
value: [keyword] |
|
|
|
@ -129,7 +133,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
|
|
|
|
|
var last = BI.last(keywords); |
|
|
|
|
keywords = BI.initial(keywords || []); |
|
|
|
|
if (keywords.length > 0) { |
|
|
|
|
self._joinKeywords(keywords.slice(0, last === BI.BlankSplitChar ? 1999 : 2000), function () { |
|
|
|
|
self._joinKeywords(keywords, function () { |
|
|
|
|
if (BI.endWith(last, BI.BlankSplitChar)) { |
|
|
|
|
self.adapter.setValue(self.storeValue); |
|
|
|
|
assertShowValue(); |
|
|
|
@ -197,16 +201,17 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
|
|
|
|
|
keywords = keywords.slice(0, keywords.length - 1); |
|
|
|
|
} |
|
|
|
|
if (/\u200b\s\u200b$/.test(val)) { |
|
|
|
|
return keywords.concat([BI.BlankSplitChar]); |
|
|
|
|
keywords = keywords.concat([BI.BlankSplitChar]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return keywords; |
|
|
|
|
return keywords.length > 2000 ? keywords.slice(0, 2000).concat([BI.BlankSplitChar]) : keywords.slice(0, 2000); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getKeywordsLength: function () { |
|
|
|
|
var keywords = this._getKeywords(); |
|
|
|
|
var val = this.editor.getValue(); |
|
|
|
|
var keywords = val.split(/\u200b\s\u200b/); |
|
|
|
|
|
|
|
|
|
return keywords[keywords.length - 1] === BI.BlankSplitChar ? keywords.length - 1 : keywords.length; |
|
|
|
|
return keywords.length - 1; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_showAdapter: function () { |
|
|
|
|