Browse Source

Merge pull request #815 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit 'ac81622d1f5bf36aaccfd0249993d75628b7fc37':
  update
  MOBILE-19241 && BI-38670 单选系列添加不选配置
master
windy 6 years ago
parent
commit
dc036c9913
  1. 3
      demo/version.js
  2. 67
      dist/bundle.ie.js
  3. 20
      dist/bundle.ie.min.js
  4. 67
      dist/bundle.js
  5. 22
      dist/bundle.min.js
  6. 2
      dist/case.js
  7. 3
      dist/config.js
  8. 64
      dist/fineui.ie.js
  9. 18
      dist/fineui.ie.min.js
  10. 64
      dist/fineui.js
  11. 22
      dist/fineui.min.js
  12. 67
      dist/fineui_without_jquery_polyfill.js
  13. 3
      dist/utils.js
  14. 4
      dist/utils.min.js
  15. 62
      dist/widget.js
  16. 3
      public/js/fineui.i18n.js
  17. 4
      src/widget/date/calendar/picker.date.js
  18. 4
      src/widget/singleselect/search/singleselect.search.loader.js
  19. 2
      src/widget/singleselect/search/singleselect.search.pane.js
  20. 3
      src/widget/singleselect/singleselect.combo.js
  21. 3
      src/widget/singleselect/singleselect.insert.combo.js
  22. 28
      src/widget/singleselect/singleselect.list.js
  23. 7
      src/widget/singleselect/singleselect.loader.js
  24. 2
      src/widget/singleselect/singleselect.popup.view.js
  25. 2
      src/widget/singleselect/singleselect.trigger.js
  26. 3
      src/widget/singleselect/singleselectlist.insert.js
  27. 4
      src/widget/singleselect/trigger/searcher.singleselect.js
  28. 3
      ui/js/fineui.i18n.js

3
demo/version.js

@ -169,5 +169,6 @@ BI.i18n = {
"BI-Basic_Please_Select": "请选择", "BI-Basic_Please_Select": "请选择",
"BI-Basic_Font_Color": "文字颜色", "BI-Basic_Font_Color": "文字颜色",
"BI-Basic_Background_Color": "背景色", "BI-Basic_Background_Color": "背景色",
"BI-Basic_Underline": "下划线" "BI-Basic_Underline": "下划线",
"BI-Basic_No_Select": "不选"
}; };

67
dist/bundle.ie.js vendored

@ -57212,7 +57212,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager", extraCls: "bi-all-count-pager",
height: 20, height: 24,
pages: 1, // 必选项 pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数 count: 1 // 总行数
@ -59333,8 +59333,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();
@ -75281,6 +75281,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -75295,6 +75296,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -75354,7 +75356,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -75438,6 +75440,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -75458,6 +75461,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -75528,6 +75532,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -75553,6 +75558,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -75621,6 +75627,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -75798,6 +75805,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -75822,6 +75830,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -75890,6 +75899,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76133,7 +76143,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -76144,8 +76155,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -76165,7 +76181,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },
@ -76258,9 +76292,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -76275,6 +76307,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76349,7 +76382,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
@ -76413,6 +76446,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -76428,6 +76462,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76496,6 +76531,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -76516,6 +76552,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
@ -76598,6 +76635,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -76615,6 +76653,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -76633,6 +76672,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
@ -76919,7 +76959,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -76945,6 +76986,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();
@ -83689,5 +83731,6 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
"BI-Basic_Wan": "万", "BI-Basic_Wan": "万",
"BI-Basic_Million": "百万", "BI-Basic_Million": "百万",
"BI-Basic_Billion": "亿", "BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度" "BI-Basic_Quarter": "季度",
"BI-Basic_No_Select": "不选"
};BI.resourceURL = "https://fanruan.coding.me/fineui/dist/resource/"; };BI.resourceURL = "https://fanruan.coding.me/fineui/dist/resource/";

20
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

67
dist/bundle.js vendored

@ -57616,7 +57616,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager", extraCls: "bi-all-count-pager",
height: 20, height: 24,
pages: 1, // 必选项 pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数 count: 1 // 总行数
@ -59737,8 +59737,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();
@ -75685,6 +75685,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -75699,6 +75700,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -75758,7 +75760,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -75842,6 +75844,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -75862,6 +75865,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -75932,6 +75936,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -75957,6 +75962,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -76025,6 +76031,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76202,6 +76209,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -76226,6 +76234,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -76294,6 +76303,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76537,7 +76547,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -76548,8 +76559,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -76569,7 +76585,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },
@ -76662,9 +76696,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -76679,6 +76711,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76753,7 +76786,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
@ -76817,6 +76850,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -76832,6 +76866,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76900,6 +76935,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -76920,6 +76956,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
@ -77002,6 +77039,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -77019,6 +77057,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -77037,6 +77076,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
@ -77323,7 +77363,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -77349,6 +77390,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();
@ -84017,5 +84059,6 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
"BI-Basic_Wan": "万", "BI-Basic_Wan": "万",
"BI-Basic_Million": "百万", "BI-Basic_Million": "百万",
"BI-Basic_Billion": "亿", "BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度" "BI-Basic_Quarter": "季度",
"BI-Basic_No_Select": "不选"
};BI.resourceURL = "https://fanruan.coding.me/fineui/dist/resource/"; };BI.resourceURL = "https://fanruan.coding.me/fineui/dist/resource/";

22
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -8012,7 +8012,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager", extraCls: "bi-all-count-pager",
height: 20, height: 24,
pages: 1, // 必选项 pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数 count: 1 // 总行数

3
dist/config.js vendored

@ -169,5 +169,6 @@ BI.i18n = {
"BI-Basic_Please_Select": "请选择", "BI-Basic_Please_Select": "请选择",
"BI-Basic_Font_Color": "文字颜色", "BI-Basic_Font_Color": "文字颜色",
"BI-Basic_Background_Color": "背景色", "BI-Basic_Background_Color": "背景色",
"BI-Basic_Underline": "下划线" "BI-Basic_Underline": "下划线",
"BI-Basic_No_Select": "不选"
}; };

64
dist/fineui.ie.js vendored

@ -57457,7 +57457,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager", extraCls: "bi-all-count-pager",
height: 20, height: 24,
pages: 1, // 必选项 pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数 count: 1 // 总行数
@ -59578,8 +59578,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();
@ -75526,6 +75526,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -75540,6 +75541,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -75599,7 +75601,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -75683,6 +75685,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -75703,6 +75706,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -75773,6 +75777,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -75798,6 +75803,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -75866,6 +75872,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76043,6 +76050,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -76067,6 +76075,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -76135,6 +76144,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76378,7 +76388,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -76389,8 +76400,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -76410,7 +76426,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },
@ -76503,9 +76537,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -76520,6 +76552,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76594,7 +76627,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
@ -76658,6 +76691,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -76673,6 +76707,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76741,6 +76776,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -76761,6 +76797,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
@ -76843,6 +76880,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -76860,6 +76898,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -76878,6 +76917,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
@ -77164,7 +77204,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -77190,6 +77231,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();

18
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

64
dist/fineui.js vendored

@ -57861,7 +57861,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager", extraCls: "bi-all-count-pager",
height: 20, height: 24,
pages: 1, // 必选项 pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数 count: 1 // 总行数
@ -59982,8 +59982,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();
@ -75930,6 +75930,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -75944,6 +75945,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -76003,7 +76005,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -76087,6 +76089,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -76107,6 +76110,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -76177,6 +76181,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -76202,6 +76207,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -76270,6 +76276,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76447,6 +76454,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -76471,6 +76479,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -76539,6 +76548,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -76782,7 +76792,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -76793,8 +76804,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -76814,7 +76830,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },
@ -76907,9 +76941,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -76924,6 +76956,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -76998,7 +77031,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
@ -77062,6 +77095,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -77077,6 +77111,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -77145,6 +77180,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -77165,6 +77201,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
@ -77247,6 +77284,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -77264,6 +77302,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -77282,6 +77321,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
@ -77568,7 +77608,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -77594,6 +77635,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();

22
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

67
dist/fineui_without_jquery_polyfill.js vendored

@ -40874,7 +40874,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager", extraCls: "bi-all-count-pager",
height: 20, height: 24,
pages: 1, // 必选项 pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用, curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数 count: 1 // 总行数
@ -42796,8 +42796,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();
@ -58744,6 +58744,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -58758,6 +58759,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -58817,7 +58819,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -58901,6 +58903,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -58921,6 +58924,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -58991,6 +58995,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -59016,6 +59021,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -59084,6 +59090,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -59261,6 +59268,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -59285,6 +59293,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -59353,6 +59362,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -59596,7 +59606,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -59607,8 +59618,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -59628,7 +59644,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },
@ -59721,9 +59755,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -59738,6 +59770,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -59812,7 +59845,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
@ -59876,6 +59909,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -59891,6 +59925,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -59959,6 +59994,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -59979,6 +60015,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
@ -60061,6 +60098,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -60078,6 +60116,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -60096,6 +60135,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
@ -60382,7 +60422,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -60408,6 +60449,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();
@ -66476,5 +66518,6 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
"BI-Basic_Please_Select": "请选择", "BI-Basic_Please_Select": "请选择",
"BI-Basic_Font_Color": "文字颜色", "BI-Basic_Font_Color": "文字颜色",
"BI-Basic_Background_Color": "背景色", "BI-Basic_Background_Color": "背景色",
"BI-Basic_Underline": "下划线" "BI-Basic_Underline": "下划线",
"BI-Basic_No_Select": "不选"
};BI.resourceURL = "file?path=/com/fr/web/ui/resource"; };BI.resourceURL = "file?path=/com/fr/web/ui/resource";

3
dist/utils.js vendored

@ -16038,7 +16038,8 @@ BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];BI.i18n = {
"BI-Basic_Wan": "万", "BI-Basic_Wan": "万",
"BI-Basic_Million": "百万", "BI-Basic_Million": "百万",
"BI-Basic_Billion": "亿", "BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度" "BI-Basic_Quarter": "季度",
"BI-Basic_No_Select": "不选"
};/** };/**
* 缓冲池 * 缓冲池
* @type {{Buffer: {}}} * @type {{Buffer: {}}}

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

62
dist/widget.js vendored

@ -285,8 +285,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();
@ -16233,6 +16233,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -16247,6 +16248,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -16306,7 +16308,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false
@ -16390,6 +16392,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -16410,6 +16413,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -16480,6 +16484,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -16505,6 +16510,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -16573,6 +16579,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -16750,6 +16757,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -16774,6 +16782,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -16842,6 +16851,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
@ -17085,7 +17095,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -17096,8 +17107,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -17117,7 +17133,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },
@ -17210,9 +17244,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -17227,6 +17259,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -17301,7 +17334,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,
@ -17365,6 +17398,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -17380,6 +17414,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -17448,6 +17483,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -17468,6 +17504,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
@ -17550,6 +17587,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -17567,6 +17605,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -17585,6 +17624,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
@ -17871,7 +17911,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -17897,6 +17938,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();

3
public/js/fineui.i18n.js

@ -184,5 +184,6 @@ BI.i18n = {
"BI-Basic_Wan": "万", "BI-Basic_Wan": "万",
"BI-Basic_Million": "百万", "BI-Basic_Million": "百万",
"BI-Basic_Billion": "亿", "BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度" "BI-Basic_Quarter": "季度",
"BI-Basic_No_Select": "不选"
}; };

4
src/widget/date/calendar/picker.date.js

@ -144,8 +144,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) { setValue: function (ob) {
this._year = ob.year; this._year = BI.parseInt(ob.year);
this._month = ob.month; this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year); this.year.setValue(ob.year);
this.month.setValue(ob.month); this.month.setValue(ob.month);
this._checkLeftValid(); this._checkLeftValid();

4
src/widget/singleselect/search/singleselect.search.loader.js

@ -9,6 +9,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader", baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
@ -23,6 +24,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this, element: this,
logic: { logic: {
dynamic: false dynamic: false
@ -82,7 +84,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: { logic: {
dynamic: false dynamic: false

2
src/widget/singleselect/search/singleselect.search.pane.js

@ -16,6 +16,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card", baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn keywordGetter: BI.emptyFn
@ -36,6 +37,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_search_loader", type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter, keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {

3
src/widget/singleselect/singleselect.combo.js

@ -8,6 +8,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -33,6 +34,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
// adapter: this.popup, // adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) { o.itemsCreator(op, function (res) {
@ -101,6 +103,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);

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

@ -8,6 +8,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo", baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
@ -32,6 +33,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.single_select_trigger", type: "bi.single_select_trigger",
height: o.height, height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup, // adapter: this.popup,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
@ -100,6 +102,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1, adjustLength: 1,
popup: { popup: {
type: "bi.single_select_popup_view", type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () { ref: function () {
self.popup = this; self.popup = this;
self.trigger.setAdapter(this); self.trigger.setAdapter(this);

28
src/widget/singleselect/singleselect.list.js

@ -20,7 +20,8 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
el: { el: {
type: "bi.list_pane" type: "bi.list_pane"
} },
allowNoSelect: false
}); });
}, },
_init: function () { _init: function () {
@ -31,8 +32,13 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
type: "bi.list_pane", type: "bi.list_pane",
items: o.items, items: o.items,
itemsCreator: function (op, callback) { itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) { o.itemsCreator(op, function (items) {
callback.apply(self, arguments); callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar && self.toolbar.setVisible(items && items.length > 0);
self.toolbar && self.toolbar.setEnable(items && items.length > 0);
}
}); });
}, },
onLoaded: o.onLoaded, onLoaded: o.onLoaded,
@ -52,7 +58,25 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({ }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true scrolly: true
}, o.logic, { }, o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list) items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
height: 24,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
self.toolbar = _ref;
},
listeners: [{
eventName: BI.Controller.EVENT_CHANGE,
action: function (type) {
if (type === BI.Events.CLICK) {
self.list.setValue();
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}
}]
}, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)
})))); }))));
}, },

7
src/widget/singleselect/singleselect.loader.js

@ -12,9 +12,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: true dynamic: true
}, },
el: { allowNoSelect: false,
height: 400
},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
@ -29,6 +27,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value; this.storeValue = opts.value;
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
type: "bi.single_select_list", type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic, logic: opts.logic,
el: BI.extend({ el: BI.extend({
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,
@ -103,7 +102,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) { _createItems: function (items) {
return BI.createItems(items, { return BI.createItems(items, {
type: "bi.single_select_combo_item", type: this.options.allowNoSelect ? "bi.single_select_item" : "bi.single_select_combo_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: 24, height: 24,

2
src/widget/singleselect/singleselect.popup.view.js

@ -8,6 +8,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view", baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto", maxWidth: "auto",
minWidth: 135, minWidth: 135,
maxHeight: 400, maxHeight: 400,
@ -23,6 +24,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({ this.loader = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator, itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter, valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded, onLoaded: opts.onLoaded,

2
src/widget/singleselect/singleselect.trigger.js

@ -16,6 +16,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border", baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcher: {}, searcher: {},
@ -36,6 +37,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, { this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher", type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text, text: o.text,
height: o.height, height: o.height,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,

3
src/widget/singleselect/singleselectlist.insert.js

@ -7,6 +7,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn valueFormatter: BI.emptyFn
}); });
@ -24,6 +25,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({ this.adapter = BI.createWidget({
type: "bi.single_select_loader", type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom", cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -42,6 +44,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({ this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom", cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {

4
src/widget/singleselect/trigger/searcher.singleselect.js

@ -14,7 +14,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {}, popup: {},
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
adapter: null, adapter: null,
masker: {} masker: {},
allowNoSelect: false
}); });
}, },
@ -40,6 +41,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.single_select_search_pane", type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();

3
ui/js/fineui.i18n.js

@ -168,5 +168,6 @@ BI.i18n = {
"BI-Basic_Please_Select": "请选择", "BI-Basic_Please_Select": "请选择",
"BI-Basic_Font_Color": "文字颜色", "BI-Basic_Font_Color": "文字颜色",
"BI-Basic_Background_Color": "背景色", "BI-Basic_Background_Color": "背景色",
"BI-Basic_Underline": "下划线" "BI-Basic_Underline": "下划线",
"BI-Basic_No_Select": "不选"
}; };
Loading…
Cancel
Save