Browse Source

BI-42011 fix: single_select_insert_combo的添加值交互与复选框统一

es6
windy 6 years ago
parent
commit
b7dbd09c12
  1. 128
      dist/2.0/fineui.ie.js
  2. 14
      dist/2.0/fineui.ie.min.js
  3. 128
      dist/2.0/fineui.js
  4. 14
      dist/2.0/fineui.min.js
  5. 128
      dist/bundle.ie.js
  6. 14
      dist/bundle.ie.min.js
  7. 128
      dist/bundle.js
  8. 14
      dist/bundle.min.js
  9. 128
      dist/fineui.ie.js
  10. 14
      dist/fineui.ie.min.js
  11. 128
      dist/fineui.js
  12. 14
      dist/fineui.min.js
  13. 128
      dist/fineui_without_jquery_polyfill.js
  14. 2
      dist/utils.min.js
  15. 128
      dist/widget.js
  16. 112
      src/widget/singleselect/search/singleselect.search.pane.insert.js
  17. 17
      src/widget/singleselect/singleselect.insert.combo.js

128
dist/2.0/fineui.ie.js vendored

@ -75671,6 +75671,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -76091,7 +76202,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

14
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/2.0/fineui.js vendored

@ -76075,6 +76075,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -76495,7 +76606,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

14
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/bundle.ie.js vendored

@ -75671,6 +75671,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -76091,7 +76202,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

14
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/bundle.js vendored

@ -76075,6 +76075,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -76495,7 +76606,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

14
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/fineui.ie.js vendored

@ -75916,6 +75916,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -76336,7 +76447,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

14
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/fineui.js vendored

@ -76320,6 +76320,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -76740,7 +76851,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

14
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/fineui_without_jquery_polyfill.js vendored

@ -59155,6 +59155,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -59575,7 +59686,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/widget.js vendored

@ -16229,6 +16229,117 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
BI.SingleSelectSearchLoader.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_loader", BI.SingleSelectSearchLoader);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchPane
@ -16649,7 +16760,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

112
src/widget/singleselect/search/singleselect.search.pane.insert.js

@ -0,0 +1,112 @@
/**
*
* 在搜索框中输入文本弹出的面板
* @class BI.SingleSelectSearchInsertPane
* @extends Widget
*/
BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {
constants: {
height: 25,
lgap: 10,
tgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
});
},
_init: function () {
BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.tooltipClick = BI.createWidget({
type: "bi.label",
invisible: true,
text: BI.i18nText("BI-Click_Blank_To_Select"),
cls: "multi-select-toolbar",
height: this.constants.height
});
this.addNotMatchTip = BI.createWidget({
type: "bi.text_button",
invisible: true,
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height,
cls: "bi-high-light",
hgap: 5,
handler: function () {
self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());
}
});
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator.apply(self, [op, function (res) {
callback(res);
self.setKeyword(o.keywordGetter());
}]);
},
value: o.value
});
this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.resizer = BI.createWidget({
type: "bi.vtape",
element: this,
items: [{
type: "bi.vertical",
items: [this.tooltipClick, this.addNotMatchTip],
height: this.constants.height
}, {
el: this.loader
}]
});
},
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);
!isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword));
},
hasMatched: function () {
return this.tooltipClick.isVisible();
},
setValue: function (v) {
this.loader.setValue(v);
},
getValue: function () {
return this.loader.getValue();
},
empty: function () {
this.loader.empty();
},
populate: function (items) {
this.loader.populate.apply(this.loader, arguments);
}
});
BI.SingleSelectSearchInsertPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.single_select_search_insert_pane", BI.SingleSelectSearchInsertPane);

17
src/widget/singleselect/singleselect.insert.combo.js

@ -46,7 +46,22 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
});
},
text: o.text,
value: this.storeValue
value: this.storeValue,
searcher: {
popup: {
type: "bi.single_select_search_insert_pane",
listeners: [{
eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,
action: function () {
if (!self.trigger.getSearcher().hasMatched()) {
self.storeValue = self.trigger.getSearcher().getKeyword();
assertShowValue();
self._defaultState();
}
}
}]
}
}
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {

Loading…
Cancel
Save