Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~imp/fineui_fui

* 'master' of ssh://cloud.finedevelop.com:7999/~imp/fineui_fui:
  无jira任务,半选框缺了个灰化状态图标.
  update
  MOBILE-19241 && BI-38670 单选系列添加不选配置
  all_count_pager默认高度调为24

# Conflicts:
#	dist/bundle.ie.min.js
#	dist/bundle.min.js
#	dist/fineui.ie.min.js
#	dist/fineui.min.js
#	dist/utils.min.js
es6
imp 6 years ago
parent
commit
bdee9f157f
  1. 3
      demo/version.js
  2. 12
      dist/bundle.css
  3. 111
      dist/bundle.ie.js
  4. 20
      dist/bundle.ie.min.js
  5. 111
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 22
      dist/bundle.min.js
  8. 2
      dist/case.js
  9. 3
      dist/config.js
  10. 25
      dist/demo.js
  11. 12
      dist/fineui.css
  12. 108
      dist/fineui.ie.js
  13. 18
      dist/fineui.ie.min.js
  14. 108
      dist/fineui.js
  15. 2
      dist/fineui.min.css
  16. 22
      dist/fineui.min.js
  17. 111
      dist/fineui_without_jquery_polyfill.js
  18. BIN
      dist/images/1x/icon/half_selected_disable.png
  19. BIN
      dist/images/2x/icon/half_selected_disable.png
  20. 12
      dist/resource.css
  21. 3
      dist/utils.js
  22. 4
      dist/utils.min.js
  23. 106
      dist/widget.js
  24. 12
      public/css/icon.css
  25. 3
      public/js/fineui.i18n.js
  26. 2
      src/case/pager/pager.all.count.js
  27. 12
      src/css/resource/icon.css
  28. 1
      src/less/lib/icon.less
  29. 2
      src/less/resource/icon.less
  30. 4
      src/widget/date/calendar/picker.date.js
  31. 4
      src/widget/singleselect/search/singleselect.search.loader.js
  32. 2
      src/widget/singleselect/search/singleselect.search.pane.js
  33. 3
      src/widget/singleselect/singleselect.combo.js
  34. 3
      src/widget/singleselect/singleselect.insert.combo.js
  35. 72
      src/widget/singleselect/singleselect.list.js
  36. 7
      src/widget/singleselect/singleselect.loader.js
  37. 2
      src/widget/singleselect/singleselect.popup.view.js
  38. 2
      src/widget/singleselect/singleselect.trigger.js
  39. 3
      src/widget/singleselect/singleselectlist.insert.js
  40. 4
      src/widget/singleselect/trigger/searcher.singleselect.js
  41. 12
      ui/css/icon.css
  42. 3
      ui/js/fineui.i18n.js

3
demo/version.js

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

12
dist/bundle.css vendored

@ -5881,6 +5881,18 @@ textarea::-webkit-scrollbar-thumb:hover {
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png');
_background: none;
}
.check-half-select-icon.disabled .x-icon {
display: block;
background: url('https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected_disable.png');
background-size: contain;
_background: none;
}
.check-half-select-icon.disabled .x-icon.hack {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected_disable.png');
_background: none;
}
.slider-icon .x-icon {
display: block;
background: url('https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png') no-repeat center center;

111
dist/bundle.ie.js vendored

@ -57212,7 +57212,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager",
height: 20,
height: 24,
pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数
@ -59333,8 +59333,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) {
this._year = ob.year;
this._month = ob.month;
this._year = BI.parseInt(ob.year);
this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year);
this.month.setValue(ob.month);
this._checkLeftValid();
@ -75281,6 +75281,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn
@ -75295,6 +75296,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({
type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this,
logic: {
dynamic: false
@ -75354,7 +75356,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (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",
logic: {
dynamic: false
@ -75438,6 +75440,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
@ -75458,6 +75461,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
@ -75528,6 +75532,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
@ -75553,6 +75558,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger",
height: o.height,
// adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) {
@ -75621,6 +75627,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1,
popup: {
type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () {
self.popup = this;
self.trigger.setAdapter(this);
@ -75798,6 +75805,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
@ -75822,6 +75830,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.single_select_trigger",
height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
@ -75890,6 +75899,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1,
popup: {
type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () {
self.popup = this;
self.trigger.setAdapter(this);
@ -76119,7 +76129,7 @@ BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);/**
* @extends BI.Widget
*/
BI.SingleSelectList = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-list",
@ -76133,26 +76143,32 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn,
el: {
type: "bi.list_pane"
}
},
allowNoSelect: false
});
},
_init: function () {
BI.SingleSelectList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.list = BI.createWidget(o.el, {
type: "bi.list_pane",
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
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,
hasNext: o.hasNext,
value: o.value
});
this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) {
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE, value, obj);
@ -76165,80 +76181,98 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true
}, 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)
}))));
},
hasPrev: function () {
return this.list.hasPrev();
},
hasNext: function () {
return this.list.hasNext();
},
prependItems: function (items) {
this.list.prependItems.apply(this.list, arguments);
},
addItems: function (items) {
this.list.addItems.apply(this.list, arguments);
},
setValue: function (v) {
this.list.setValue([v]);
},
getValue: function () {
return this.list.getValue()[0];
},
empty: function () {
this.list.empty();
},
populate: function (items) {
this.list.populate.apply(this.list, arguments);
},
resetHeight: function (h) {
this.list.resetHeight ? this.list.resetHeight(h) :
this.list.element.css({"max-height": h + "px"});
},
setNotSelectedValue: function () {
this.list.setNotSelectedValue.apply(this.list, arguments);
},
getNotSelectedValue: function () {
return this.list.getNotSelectedValue();
},
getAllButtons: function () {
return this.list.getAllButtons();
},
getAllLeaves: function () {
return this.list.getAllLeaves();
},
getSelectedButtons: function () {
return this.list.getSelectedButtons();
},
getNotSelectedButtons: function () {
return this.list.getNotSelectedButtons();
},
getIndexByValue: function (value) {
return this.list.getIndexByValue(value);
},
getNodeById: function (id) {
return this.list.getNodeById(id);
},
getNodeByValue: function (value) {
return this.list.getNodeByValue(value);
}
@ -76258,9 +76292,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: {
dynamic: true
},
el: {
height: 400
},
allowNoSelect: false,
valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn
@ -76275,6 +76307,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value;
this.button_group = BI.createWidget({
type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic,
el: BI.extend({
onLoaded: opts.onLoaded,
@ -76349,7 +76382,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (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,
cls: "bi-list-item-active",
height: 24,
@ -76413,6 +76446,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto",
minWidth: 135,
maxHeight: 400,
@ -76428,6 +76462,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({
type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded,
@ -76496,6 +76531,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
searcher: {},
@ -76516,6 +76552,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text,
height: o.height,
itemsCreator: o.itemsCreator,
@ -76598,6 +76635,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn
});
@ -76615,6 +76653,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({
type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@ -76633,6 +76672,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter,
keywordGetter: function () {
@ -76919,7 +76959,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {},
valueFormatter: BI.emptyFn,
adapter: null,
masker: {}
masker: {},
allowNoSelect: false
});
},
@ -76945,6 +76986,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({
type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter,
keywordGetter: function () {
return self.editor.getValue();
@ -83689,5 +83731,6 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
"BI-Basic_Wan": "万",
"BI-Basic_Million": "百万",
"BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度"
"BI-Basic_Quarter": "季度",
"BI-Basic_No_Select": "不选"
};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

111
dist/bundle.js vendored

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

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

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 () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager",
height: 20,
height: 24,
pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数

3
dist/config.js vendored

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

25
dist/demo.js vendored

@ -6158,30 +6158,7 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
};
}
});
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
BI.shortcut("demo.htape", Demo.HtapeLayout);/**
* Created by User on 2017/3/22.
*/
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

12
dist/fineui.css vendored

@ -5881,6 +5881,18 @@ textarea::-webkit-scrollbar-thumb:hover {
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png');
_background: none;
}
.check-half-select-icon.disabled .x-icon {
display: block;
background: url('resources?path=/com/fr/web/ui/images/2x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/2x/icon/half_selected_disable.png');
background-size: contain;
_background: none;
}
.check-half-select-icon.disabled .x-icon.hack {
background: url('resources?path=/com/fr/web/ui/images/1x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/1x/icon/half_selected_disable.png');
_background: none;
}
.slider-icon .x-icon {
display: block;
background: url('resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png') no-repeat center center;

108
dist/fineui.ie.js vendored

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

18
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

108
dist/fineui.js vendored

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

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

22
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

111
dist/fineui_without_jquery_polyfill.js vendored

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

BIN
dist/images/1x/icon/half_selected_disable.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

BIN
dist/images/2x/icon/half_selected_disable.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

12
dist/resource.css vendored

@ -1729,6 +1729,18 @@ textarea::-webkit-scrollbar-thumb:hover {
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.check-half-select-icon.disabled .x-icon {
display: block;
background: url('images/2x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected_disable.png');
background-size: contain;
_background: none;
}
.check-half-select-icon.disabled .x-icon.hack {
background: url('images/1x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected_disable.png');
_background: none;
}
.slider-icon .x-icon {
display: block;
background: url('images/2x/icon/slider_normal_small.png') no-repeat center center;

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_Million": "百万",
"BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度"
"BI-Basic_Quarter": "季度",
"BI-Basic_No_Select": "不选"
};/**
* 缓冲池
* @type {{Buffer: {}}}

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

106
dist/widget.js vendored

@ -285,8 +285,8 @@ BI.DatePicker = BI.inherit(BI.Widget, {
setValue: function (ob) {
this._year = ob.year;
this._month = ob.month;
this._year = BI.parseInt(ob.year);
this._month = BI.parseInt(ob.month);
this.year.setValue(ob.year);
this.month.setValue(ob.month);
this._checkLeftValid();
@ -16233,6 +16233,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn
@ -16247,6 +16248,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({
type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this,
logic: {
dynamic: false
@ -16306,7 +16308,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (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",
logic: {
dynamic: false
@ -16390,6 +16392,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-pane bi-card",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn
@ -16410,6 +16413,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({
type: "bi.single_select_search_loader",
allowNoSelect: o.allowNoSelect,
keywordGetter: o.keywordGetter,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
@ -16480,6 +16484,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
@ -16505,6 +16510,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
type: "bi.single_select_trigger",
height: o.height,
// adapter: this.popup,
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (res) {
@ -16573,6 +16579,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
adjustLength: 1,
popup: {
type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () {
self.popup = this;
self.trigger.setAdapter(this);
@ -16750,6 +16757,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24,
@ -16774,6 +16782,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.single_select_trigger",
height: o.height,
allowNoSelect: o.allowNoSelect,
// adapter: this.popup,
valueFormatter: o.valueFormatter,
itemsCreator: function (op, callback) {
@ -16842,6 +16851,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
adjustLength: 1,
popup: {
type: "bi.single_select_popup_view",
allowNoSelect: o.allowNoSelect,
ref: function () {
self.popup = this;
self.trigger.setAdapter(this);
@ -17071,7 +17081,7 @@ BI.shortcut("bi.single_select_combo_item", BI.SingleSelectComboItem);/**
* @extends BI.Widget
*/
BI.SingleSelectList = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-list",
@ -17085,26 +17095,32 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn,
el: {
type: "bi.list_pane"
}
},
allowNoSelect: false
});
},
_init: function () {
BI.SingleSelectList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.list = BI.createWidget(o.el, {
type: "bi.list_pane",
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
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,
hasNext: o.hasNext,
value: o.value
});
this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) {
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE, value, obj);
@ -17117,80 +17133,98 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true
}, 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)
}))));
},
hasPrev: function () {
return this.list.hasPrev();
},
hasNext: function () {
return this.list.hasNext();
},
prependItems: function (items) {
this.list.prependItems.apply(this.list, arguments);
},
addItems: function (items) {
this.list.addItems.apply(this.list, arguments);
},
setValue: function (v) {
this.list.setValue([v]);
},
getValue: function () {
return this.list.getValue()[0];
},
empty: function () {
this.list.empty();
},
populate: function (items) {
this.list.populate.apply(this.list, arguments);
},
resetHeight: function (h) {
this.list.resetHeight ? this.list.resetHeight(h) :
this.list.element.css({"max-height": h + "px"});
},
setNotSelectedValue: function () {
this.list.setNotSelectedValue.apply(this.list, arguments);
},
getNotSelectedValue: function () {
return this.list.getNotSelectedValue();
},
getAllButtons: function () {
return this.list.getAllButtons();
},
getAllLeaves: function () {
return this.list.getAllLeaves();
},
getSelectedButtons: function () {
return this.list.getSelectedButtons();
},
getNotSelectedButtons: function () {
return this.list.getNotSelectedButtons();
},
getIndexByValue: function (value) {
return this.list.getIndexByValue(value);
},
getNodeById: function (id) {
return this.list.getNodeById(id);
},
getNodeByValue: function (value) {
return this.list.getNodeByValue(value);
}
@ -17210,9 +17244,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: {
dynamic: true
},
el: {
height: 400
},
allowNoSelect: false,
valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn
@ -17227,6 +17259,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value;
this.button_group = BI.createWidget({
type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic,
el: BI.extend({
onLoaded: opts.onLoaded,
@ -17301,7 +17334,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (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,
cls: "bi-list-item-active",
height: 24,
@ -17365,6 +17398,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-popup-view",
allowNoSelect: false,
maxWidth: "auto",
minWidth: 135,
maxHeight: 400,
@ -17380,6 +17414,7 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.loader = BI.createWidget({
type: "bi.single_select_loader",
allowNoSelect: opts.allowNoSelect,
itemsCreator: opts.itemsCreator,
valueFormatter: opts.valueFormatter,
onLoaded: opts.onLoaded,
@ -17448,6 +17483,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-trigger bi-border",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
searcher: {},
@ -17468,6 +17504,7 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, {
this.searcher = BI.createWidget(o.searcher, {
type: "bi.single_select_searcher",
allowNoSelect: o.allowNoSelect,
text: o.text,
height: o.height,
itemsCreator: o.itemsCreator,
@ -17550,6 +17587,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn
});
@ -17567,6 +17605,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.adapter = BI.createWidget({
type: "bi.single_select_loader",
allowNoSelect: o.allowNoSelect,
cls: "popup-single-select-list bi-border-left bi-border-right bi-border-bottom",
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@ -17585,6 +17624,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
this.searcherPane = BI.createWidget({
type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
cls: "bi-border-left bi-border-right bi-border-bottom",
valueFormatter: o.valueFormatter,
keywordGetter: function () {
@ -17871,7 +17911,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: {},
valueFormatter: BI.emptyFn,
adapter: null,
masker: {}
masker: {},
allowNoSelect: false
});
},
@ -17897,6 +17938,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({
type: "bi.single_select_search_pane",
allowNoSelect: o.allowNoSelect,
valueFormatter: o.valueFormatter,
keywordGetter: function () {
return self.editor.getValue();

12
public/css/icon.css

@ -422,6 +422,18 @@
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected.png');
_background: none;
}
.check-half-select-icon.disabled .x-icon {
display: block;
background: url('https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/2x/icon/half_selected_disable.png');
background-size: contain;
_background: none;
}
.check-half-select-icon.disabled .x-icon.hack {
background: url('https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://fanruan.coding.me/fineui/dist/images/1x/icon/half_selected_disable.png');
_background: none;
}
.slider-icon .x-icon {
display: block;
background: url('https://fanruan.coding.me/fineui/dist/images/2x/icon/slider_normal_small.png') no-repeat center center;

3
public/js/fineui.i18n.js

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

2
src/case/pager/pager.all.count.js

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

12
src/css/resource/icon.css

@ -422,6 +422,18 @@
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.check-half-select-icon.disabled .x-icon {
display: block;
background: url('images/2x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected_disable.png');
background-size: contain;
_background: none;
}
.check-half-select-icon.disabled .x-icon.hack {
background: url('images/1x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected_disable.png');
_background: none;
}
.slider-icon .x-icon {
display: block;
background: url('images/2x/icon/slider_normal_small.png') no-repeat center center;

1
src/less/lib/icon.less

@ -9,6 +9,7 @@
@icon-radio-active-disable: "icon/radio_disable2.png";
@icon-half-select: "icon/half_selected.png";
@icon-half-select-disable: "icon/half_selected_disable.png";
@icon-tree-expand-type1: "icon/tree_expand_1.png";
@icon-tree-expand-type2: "icon/tree_expand_2.png";

2
src/less/resource/icon.less

@ -64,7 +64,7 @@
.icon_custom(radio-icon, @icon-radio-normal, @icon-radio-normal, @icon-radio-normal, @icon-radio-active, @icon-radio-disable, @icon-radio-active-disable);
//Half Select
.icon(check-half-select-icon, @icon-half-select);
.icon_custom(check-half-select-icon, @icon-half-select, @icon-half-select-disable);
//滑块
.icon_hover(slider-icon, @icon-slider-normal, @icon-slider-active);

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

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

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

@ -9,6 +9,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-search-loader",
allowNoSelect: false,
itemsCreator: BI.emptyFn,
keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn
@ -23,6 +24,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
this.button_group = BI.createWidget({
type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
element: this,
logic: {
dynamic: false
@ -82,7 +84,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (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",
logic: {
dynamic: false

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

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

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

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

72
src/widget/singleselect/singleselect.list.js

@ -6,7 +6,7 @@
* @extends BI.Widget
*/
BI.SingleSelectList = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-list",
@ -20,26 +20,32 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
onLoaded: BI.emptyFn,
el: {
type: "bi.list_pane"
}
},
allowNoSelect: false
});
},
_init: function () {
BI.SingleSelectList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.list = BI.createWidget(o.el, {
type: "bi.list_pane",
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
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,
hasNext: o.hasNext,
value: o.value
});
this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (type === BI.Events.CLICK) {
self.fireEvent(BI.SingleSelectList.EVENT_CHANGE, value, obj);
@ -52,80 +58,98 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({
scrolly: true
}, 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)
}))));
},
hasPrev: function () {
return this.list.hasPrev();
},
hasNext: function () {
return this.list.hasNext();
},
prependItems: function (items) {
this.list.prependItems.apply(this.list, arguments);
},
addItems: function (items) {
this.list.addItems.apply(this.list, arguments);
},
setValue: function (v) {
this.list.setValue([v]);
},
getValue: function () {
return this.list.getValue()[0];
},
empty: function () {
this.list.empty();
},
populate: function (items) {
this.list.populate.apply(this.list, arguments);
},
resetHeight: function (h) {
this.list.resetHeight ? this.list.resetHeight(h) :
this.list.element.css({"max-height": h + "px"});
},
setNotSelectedValue: function () {
this.list.setNotSelectedValue.apply(this.list, arguments);
},
getNotSelectedValue: function () {
return this.list.getNotSelectedValue();
},
getAllButtons: function () {
return this.list.getAllButtons();
},
getAllLeaves: function () {
return this.list.getAllLeaves();
},
getSelectedButtons: function () {
return this.list.getSelectedButtons();
},
getNotSelectedButtons: function () {
return this.list.getNotSelectedButtons();
},
getIndexByValue: function (value) {
return this.list.getIndexByValue(value);
},
getNodeById: function (id) {
return this.list.getNodeById(id);
},
getNodeByValue: function (value) {
return this.list.getNodeByValue(value);
}

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

@ -12,9 +12,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
logic: {
dynamic: true
},
el: {
height: 400
},
allowNoSelect: false,
valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn
@ -29,6 +27,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
this.storeValue = opts.value;
this.button_group = BI.createWidget({
type: "bi.single_select_list",
allowNoSelect: opts.allowNoSelect,
logic: opts.logic,
el: BI.extend({
onLoaded: opts.onLoaded,
@ -103,7 +102,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (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,
cls: "bi-list-item-active",
height: 24,

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

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

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

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

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

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

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

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

12
ui/css/icon.css

@ -422,6 +422,18 @@
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/1x/icon/half_selected.png');
_background: none;
}
.check-half-select-icon.disabled .x-icon {
display: block;
background: url('resources?path=/com/fr/web/ui/images/2x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/2x/icon/half_selected_disable.png');
background-size: contain;
_background: none;
}
.check-half-select-icon.disabled .x-icon.hack {
background: url('resources?path=/com/fr/web/ui/images/1x/icon/half_selected_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='resources?path=/com/fr/web/ui/images/1x/icon/half_selected_disable.png');
_background: none;
}
.slider-icon .x-icon {
display: block;
background: url('resources?path=/com/fr/web/ui/images/2x/icon/slider_normal_small.png') no-repeat center center;

3
ui/js/fineui.i18n.js

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