windy 7 years ago
parent
commit
b68f3890e7
  1. 6
      demo/js/base/button/demo.button.js
  2. 8
      demo/js/case/combo/demo.icon_combo.js
  3. 6
      demo/js/case/combo/demo.icon_text_value_combo.js
  4. 6
      demo/js/case/combo/demo.text_value_combo.js
  5. 6
      demo/js/widget/basewidget/demo.buttons.js
  6. 56
      demo/js/widget/basewidget/demo.mask.loading.js
  7. 6
      dist/base.js
  8. 74
      dist/bundle.js
  9. 20
      dist/bundle.min.js
  10. 47
      dist/case.js
  11. 87
      dist/demo.js
  12. 74
      dist/fineui.js
  13. 28
      dist/fineui.min.js
  14. 21
      dist/widget.js
  15. 6
      src/base/single/button/buttons/button.js
  16. 10
      src/case/button/icon/icon.change.js
  17. 5
      src/case/button/item.singleselect.icontext.js
  18. 4
      src/case/combo/iconcombo/combo.icon.js
  19. 14
      src/case/combo/iconcombo/trigger.iconcombo.js
  20. 2
      src/case/trigger/trigger.icon.text.js
  21. 12
      src/case/trigger/trigger.icon.text.select.js
  22. 3
      src/widget/downlist/combo.downlist.js
  23. 18
      src/widget/numberinterval/numberinterval.js

6
demo/js/base/button/demo.button.js

@ -54,7 +54,7 @@ Demo.Button = BI.inherit(BI.Widget, {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -114,7 +114,7 @@ Demo.Button = BI.inherit(BI.Widget, {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -174,7 +174,7 @@ Demo.Button = BI.inherit(BI.Widget, {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {

8
demo/js/case/combo/demo.icon_combo.js

@ -19,16 +19,16 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.refs = _ref;
},
iconClass: "search-font",
iconCls: "search-font",
items: [{
value: "第一项",
iconClass: "close-font"
iconCls: "close-font"
}, {
value: "第二项",
iconClass: "search-font"
iconCls: "search-font"
}, {
value: "第三项",
iconClass: "copy-font"
iconCls: "copy-font"
}]
}],
vgap: 20

6
demo/js/case/combo/demo.icon_text_value_combo.js

@ -16,15 +16,15 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, {
width: 300,
items: [{
text: "MVC-1",
iconClass: "close-font",
iconCls: "close-font",
value: 1
}, {
text: "MVC-2",
iconClass: "date-font",
iconCls: "date-font",
value: 2
}, {
text: "MVC-3",
iconClass: "search-close-h-font",
iconCls: "search-close-h-font",
value: 3
}]
}],

6
demo/js/case/combo/demo.text_value_combo.js

@ -15,15 +15,15 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
width: 300,
items: [{
text: "MVC-1",
iconClass: "date-font",
iconCls: "date-font",
value: 1
}, {
text: "MVC-2",
iconClass: "search-font",
iconCls: "search-font",
value: 2
}, {
text: "MVC-3",
iconClass: "pull-right-font",
iconCls: "pull-right-font",
value: 3
}]
}],

6
demo/js/widget/basewidget/demo.buttons.js

@ -58,7 +58,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -118,7 +118,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -178,7 +178,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {

56
demo/js/widget/basewidget/demo.mask.loading.js

@ -1,56 +0,0 @@
/**
* Created by Dailer on 2017/7/25.
*/
Demo.LoadingMask = BI.inherit(BI.Widget, {
render: function () {
var vessel = this;
var self = this;
var left = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "LoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_mask",
masker: vessel,
text: "加载中...3s后结束"
});
setTimeout(function () {
mask.destroy();
}, 3000);
}
}]
});
var right = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "CancelLoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_cancel_mask",
masker: vessel,
text: "正在加载数据"
});
mask.on(BI.LoadingCancelMask.EVENT_VALUE_CANCEL, function () {
mask.destroy();
BI.Msg.toast("取消加载了...");
});
}
}]
});
BI.createWidget({
type: "bi.center_adapt",
element: vessel,
items: [left, right],
hgap: 20
});
}
});
BI.shortcut("demo.loading_mask", Demo.LoadingMask);

6
dist/base.js vendored

@ -16471,7 +16471,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
iconCls: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
@ -16497,7 +16497,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
} else {
this.element.css({lineHeight: o.height + "px"});
}
if (BI.isKey(o.iconClass)) {
if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({
type: "bi.icon",
width: 18
@ -16509,7 +16509,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: o.iconClass,
cls: o.iconCls,
element: this,
hgap: o.hgap,
vgap: o.vgap,

74
dist/bundle.js vendored

@ -42344,7 +42344,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
iconCls: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
@ -42370,7 +42370,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
} else {
this.element.css({lineHeight: o.height + "px"});
}
if (BI.isKey(o.iconClass)) {
if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({
type: "bi.icon",
width: 18
@ -42382,7 +42382,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: o.iconClass,
cls: o.iconCls,
element: this,
hgap: o.hgap,
vgap: o.vgap,
@ -62291,7 +62291,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-icon-change-button",
iconClass: "",
iconCls: "",
iconWidth: null,
iconHeight: null,
@ -62316,7 +62316,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
this.button = BI.createWidget({
type: "bi.icon_button",
element: this,
cls: o.iconClass,
cls: o.iconCls,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
@ -62353,9 +62353,9 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
setIcon: function (cls) {
var o = this.options;
if (o.iconClass !== cls) {
this.element.removeClass(o.iconClass).addClass(cls);
o.iconClass = cls;
if (o.iconCls !== cls) {
this.element.removeClass(o.iconCls).addClass(cls);
o.iconCls = cls;
}
}
});
@ -62504,8 +62504,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
iconClass: "",
hgap: 10,
iconCls: "",
height: 25
});
},
@ -62515,7 +62514,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
this.text = BI.createWidget({
type: "bi.icon_text_item",
element: this,
cls: o.iconClass,
cls: o.iconCls,
once: o.once,
selected: o.selected,
height: o.height,
@ -67495,7 +67494,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
baseCls: "bi-icon-combo",
width: 24,
height: 24,
iconClass: "",
iconCls: "",
el: {},
popup: {},
minWidth: 100,
@ -67515,7 +67514,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger",
iconClass: o.iconClass,
iconCls: o.iconCls,
title: o.title,
items: o.items,
width: o.width,
@ -67652,7 +67651,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-icon-combo-trigger",
el: {},
items: [],
iconClass: "",
iconCls: "",
width: 25,
height: 25,
isShowDown: true
@ -67664,7 +67663,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
var o = this.options, self = this;
this.button = BI.createWidget(o.el, {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
disableSelected: true,
width: o.width,
height: o.height,
@ -67702,7 +67701,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
var o = this.options;
this.options.items = items || [];
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
},
@ -67710,19 +67709,19 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
setValue: function (v) {
BI.IconComboTrigger.superclass.setValue.apply(this, arguments);
var o = this.options;
var iconClass = "";
var iconCls = "";
v = BI.isArray(v) ? v[0] : v;
if (BI.any(this.options.items, function (i, item) {
if (v === item.value) {
iconClass = item.iconClass;
iconCls = item.iconCls;
return true;
}
})) {
this.button.setIcon(iconClass);
this.button.setIcon(iconCls);
this.button.setSelected(true);
this.down.setSelected(true);
} else {
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
}
@ -76021,7 +76020,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
ref: function (_ref) {
self.icon = _ref;
},
@ -76085,11 +76084,11 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
type: "bi.icon_text_trigger",
element: this,
text: obj.text,
iconClass: obj.iconClass,
iconCls: obj.iconCls,
height: o.height
});
},
_digist: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -76099,7 +76098,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.deepContains(vals, item.value)) {
result = {
text: item.text || item.value,
iconClass: item.iconClass
iconCls: item.iconCls
};
return true;
}
@ -76108,12 +76107,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.isNotNull(result)) {
return {
text: result.text,
iconClass: result.iconClass
iconCls: result.iconCls
};
} else {
return {
text: o.text,
iconClass: ""
iconCls: ""
};
}
},
@ -76121,7 +76120,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
setValue: function (vals) {
var obj = this._digist(vals, this.options.items);
this.trigger.setText(obj.text);
this.trigger.setIcon(obj.iconClass);
this.trigger.setIcon(obj.iconCls);
},
populate: function (items) {
@ -79816,8 +79815,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-combo",
invalid: false,
height: 25,
height: 24,
items: [],
adjustLength: 0,
direction: "bottom",
@ -89342,12 +89340,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemin === true) {
@ -89361,12 +89359,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemax === true) {
@ -89482,7 +89480,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
}
if (smallValue > bigValue) {
self.element.addClass("number-error");
@ -89496,11 +89494,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
},
_setTitle: function (v) {

20
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/case.js vendored

@ -11,7 +11,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-icon-change-button",
iconClass: "",
iconCls: "",
iconWidth: null,
iconHeight: null,
@ -36,7 +36,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
this.button = BI.createWidget({
type: "bi.icon_button",
element: this,
cls: o.iconClass,
cls: o.iconCls,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
@ -73,9 +73,9 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
setIcon: function (cls) {
var o = this.options;
if (o.iconClass !== cls) {
this.element.removeClass(o.iconClass).addClass(cls);
o.iconClass = cls;
if (o.iconCls !== cls) {
this.element.removeClass(o.iconCls).addClass(cls);
o.iconCls = cls;
}
}
});
@ -224,8 +224,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
iconClass: "",
hgap: 10,
iconCls: "",
height: 25
});
},
@ -235,7 +234,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
this.text = BI.createWidget({
type: "bi.icon_text_item",
element: this,
cls: o.iconClass,
cls: o.iconCls,
once: o.once,
selected: o.selected,
height: o.height,
@ -5215,7 +5214,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
baseCls: "bi-icon-combo",
width: 24,
height: 24,
iconClass: "",
iconCls: "",
el: {},
popup: {},
minWidth: 100,
@ -5235,7 +5234,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger",
iconClass: o.iconClass,
iconCls: o.iconCls,
title: o.title,
items: o.items,
width: o.width,
@ -5372,7 +5371,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-icon-combo-trigger",
el: {},
items: [],
iconClass: "",
iconCls: "",
width: 25,
height: 25,
isShowDown: true
@ -5384,7 +5383,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
var o = this.options, self = this;
this.button = BI.createWidget(o.el, {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
disableSelected: true,
width: o.width,
height: o.height,
@ -5422,7 +5421,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
var o = this.options;
this.options.items = items || [];
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
},
@ -5430,19 +5429,19 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
setValue: function (v) {
BI.IconComboTrigger.superclass.setValue.apply(this, arguments);
var o = this.options;
var iconClass = "";
var iconCls = "";
v = BI.isArray(v) ? v[0] : v;
if (BI.any(this.options.items, function (i, item) {
if (v === item.value) {
iconClass = item.iconClass;
iconCls = item.iconCls;
return true;
}
})) {
this.button.setIcon(iconClass);
this.button.setIcon(iconCls);
this.button.setSelected(true);
this.down.setSelected(true);
} else {
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
}
@ -13741,7 +13740,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
ref: function (_ref) {
self.icon = _ref;
},
@ -13805,11 +13804,11 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
type: "bi.icon_text_trigger",
element: this,
text: obj.text,
iconClass: obj.iconClass,
iconCls: obj.iconCls,
height: o.height
});
},
_digist: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -13819,7 +13818,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.deepContains(vals, item.value)) {
result = {
text: item.text || item.value,
iconClass: item.iconClass
iconCls: item.iconCls
};
return true;
}
@ -13828,12 +13827,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.isNotNull(result)) {
return {
text: result.text,
iconClass: result.iconClass
iconCls: result.iconCls
};
} else {
return {
text: o.text,
iconClass: ""
iconCls: ""
};
}
},
@ -13841,7 +13840,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
setValue: function (vals) {
var obj = this._digist(vals, this.options.items);
this.trigger.setText(obj.text);
this.trigger.setIcon(obj.iconClass);
this.trigger.setIcon(obj.iconCls);
},
populate: function (items) {

87
dist/demo.js vendored

@ -73,7 +73,7 @@ $(function () {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -133,7 +133,7 @@ $(function () {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -193,7 +193,7 @@ $(function () {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -1801,16 +1801,16 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.refs = _ref;
},
iconClass: "search-font",
iconCls: "search-font",
items: [{
value: "第一项",
iconClass: "close-font"
iconCls: "close-font"
}, {
value: "第二项",
iconClass: "search-font"
iconCls: "search-font"
}, {
value: "第三项",
iconClass: "copy-font"
iconCls: "copy-font"
}]
}],
vgap: 20
@ -1836,15 +1836,15 @@ Demo.IconTextValueCombo = BI.inherit(BI.Widget, {
width: 300,
items: [{
text: "MVC-1",
iconClass: "close-font",
iconCls: "close-font",
value: 1
}, {
text: "MVC-2",
iconClass: "date-font",
iconCls: "date-font",
value: 2
}, {
text: "MVC-3",
iconClass: "search-close-h-font",
iconCls: "search-close-h-font",
value: 3
}]
}],
@ -1914,15 +1914,15 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
width: 300,
items: [{
text: "MVC-1",
iconClass: "date-font",
iconCls: "date-font",
value: 1
}, {
text: "MVC-2",
iconClass: "search-font",
iconCls: "search-font",
value: 2
}, {
text: "MVC-3",
iconClass: "pull-right-font",
iconCls: "pull-right-font",
value: 3
}]
}],
@ -11771,7 +11771,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -11831,7 +11831,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -11891,7 +11891,7 @@ Demo.Buttons = BI.inherit(BI.Widget, {
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconClass: "close-font",
iconCls: "close-font",
height: 30
}
}, {
@ -11955,61 +11955,6 @@ BI.shortcut("demo.items", Demo.Items);/**
* Created by Dailer on 2017/7/25.
*/
Demo.LoadingMask = BI.inherit(BI.Widget, {
render: function () {
var vessel = this;
var self = this;
var left = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "LoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_mask",
masker: vessel,
text: "加载中...3s后结束"
});
setTimeout(function () {
mask.destroy();
}, 3000);
}
}]
});
var right = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "CancelLoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_cancel_mask",
masker: vessel,
text: "正在加载数据"
});
mask.on(BI.LoadingCancelMask.EVENT_VALUE_CANCEL, function () {
mask.destroy();
BI.Msg.toast("取消加载了...");
});
}
}]
});
BI.createWidget({
type: "bi.center_adapt",
element: vessel,
items: [left, right],
hgap: 20
});
}
});
BI.shortcut("demo.loading_mask", Demo.LoadingMask);/**
* Created by Dailer on 2017/7/25.
*/
Demo.Nodes = BI.inherit(BI.Widget, {
render: function (vessel) {

74
dist/fineui.js vendored

@ -44038,7 +44038,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
iconCls: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
@ -44064,7 +44064,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
} else {
this.element.css({lineHeight: o.height + "px"});
}
if (BI.isKey(o.iconClass)) {
if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({
type: "bi.icon",
width: 18
@ -44076,7 +44076,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: o.iconClass,
cls: o.iconCls,
element: this,
hgap: o.hgap,
vgap: o.vgap,
@ -63985,7 +63985,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-icon-change-button",
iconClass: "",
iconCls: "",
iconWidth: null,
iconHeight: null,
@ -64010,7 +64010,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
this.button = BI.createWidget({
type: "bi.icon_button",
element: this,
cls: o.iconClass,
cls: o.iconCls,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
@ -64047,9 +64047,9 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
setIcon: function (cls) {
var o = this.options;
if (o.iconClass !== cls) {
this.element.removeClass(o.iconClass).addClass(cls);
o.iconClass = cls;
if (o.iconCls !== cls) {
this.element.removeClass(o.iconCls).addClass(cls);
o.iconCls = cls;
}
}
});
@ -64198,8 +64198,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
iconClass: "",
hgap: 10,
iconCls: "",
height: 25
});
},
@ -64209,7 +64208,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
this.text = BI.createWidget({
type: "bi.icon_text_item",
element: this,
cls: o.iconClass,
cls: o.iconCls,
once: o.once,
selected: o.selected,
height: o.height,
@ -69189,7 +69188,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
baseCls: "bi-icon-combo",
width: 24,
height: 24,
iconClass: "",
iconCls: "",
el: {},
popup: {},
minWidth: 100,
@ -69209,7 +69208,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger",
iconClass: o.iconClass,
iconCls: o.iconCls,
title: o.title,
items: o.items,
width: o.width,
@ -69346,7 +69345,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-icon-combo-trigger",
el: {},
items: [],
iconClass: "",
iconCls: "",
width: 25,
height: 25,
isShowDown: true
@ -69358,7 +69357,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
var o = this.options, self = this;
this.button = BI.createWidget(o.el, {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
disableSelected: true,
width: o.width,
height: o.height,
@ -69396,7 +69395,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
var o = this.options;
this.options.items = items || [];
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
},
@ -69404,19 +69403,19 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
setValue: function (v) {
BI.IconComboTrigger.superclass.setValue.apply(this, arguments);
var o = this.options;
var iconClass = "";
var iconCls = "";
v = BI.isArray(v) ? v[0] : v;
if (BI.any(this.options.items, function (i, item) {
if (v === item.value) {
iconClass = item.iconClass;
iconCls = item.iconCls;
return true;
}
})) {
this.button.setIcon(iconClass);
this.button.setIcon(iconCls);
this.button.setSelected(true);
this.down.setSelected(true);
} else {
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
}
@ -77715,7 +77714,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
ref: function (_ref) {
self.icon = _ref;
},
@ -77779,11 +77778,11 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
type: "bi.icon_text_trigger",
element: this,
text: obj.text,
iconClass: obj.iconClass,
iconCls: obj.iconCls,
height: o.height
});
},
_digist: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -77793,7 +77792,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.deepContains(vals, item.value)) {
result = {
text: item.text || item.value,
iconClass: item.iconClass
iconCls: item.iconCls
};
return true;
}
@ -77802,12 +77801,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.isNotNull(result)) {
return {
text: result.text,
iconClass: result.iconClass
iconCls: result.iconCls
};
} else {
return {
text: o.text,
iconClass: ""
iconCls: ""
};
}
},
@ -77815,7 +77814,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
setValue: function (vals) {
var obj = this._digist(vals, this.options.items);
this.trigger.setText(obj.text);
this.trigger.setIcon(obj.iconClass);
this.trigger.setIcon(obj.iconCls);
},
populate: function (items) {
@ -81510,8 +81509,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-combo",
invalid: false,
height: 25,
height: 24,
items: [],
adjustLength: 0,
direction: "bottom",
@ -91036,12 +91034,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemin === true) {
@ -91055,12 +91053,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemax === true) {
@ -91176,7 +91174,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
}
if (smallValue > bigValue) {
self.element.addClass("number-error");
@ -91190,11 +91188,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
},
_setTitle: function (v) {

28
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/widget.js vendored

@ -3457,8 +3457,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-combo",
invalid: false,
height: 25,
height: 24,
items: [],
adjustLength: 0,
direction: "bottom",
@ -12983,12 +12982,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemin === true) {
@ -13002,12 +13001,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemax === true) {
@ -13123,7 +13122,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
}
if (smallValue > bigValue) {
self.element.addClass("number-error");
@ -13137,11 +13136,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
},
_setTitle: function (v) {

6
src/base/single/button/buttons/button.js

@ -18,7 +18,7 @@
shadow: props.clear !== true,
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
iconCls: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
@ -44,7 +44,7 @@
} else {
this.element.css({lineHeight: o.height + "px"});
}
if (BI.isKey(o.iconClass)) {
if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({
type: "bi.icon",
width: 18
@ -56,7 +56,7 @@
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: o.iconClass,
cls: o.iconCls,
element: this,
hgap: o.hgap,
vgap: o.vgap,

10
src/case/button/icon/icon.change.js

@ -11,7 +11,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-icon-change-button",
iconClass: "",
iconCls: "",
iconWidth: null,
iconHeight: null,
@ -36,7 +36,7 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
this.button = BI.createWidget({
type: "bi.icon_button",
element: this,
cls: o.iconClass,
cls: o.iconCls,
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
@ -73,9 +73,9 @@ BI.IconChangeButton = BI.inherit(BI.Single, {
setIcon: function (cls) {
var o = this.options;
if (o.iconClass !== cls) {
this.element.removeClass(o.iconClass).addClass(cls);
o.iconClass = cls;
if (o.iconCls !== cls) {
this.element.removeClass(o.iconCls).addClass(cls);
o.iconCls = cls;
}
}
});

5
src/case/button/item.singleselect.icontext.js

@ -8,8 +8,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
iconClass: "",
hgap: 10,
iconCls: "",
height: 25
});
},
@ -19,7 +18,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
this.text = BI.createWidget({
type: "bi.icon_text_item",
element: this,
cls: o.iconClass,
cls: o.iconCls,
once: o.once,
selected: o.selected,
height: o.height,

4
src/case/combo/iconcombo/combo.icon.js

@ -10,7 +10,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
baseCls: "bi-icon-combo",
width: 24,
height: 24,
iconClass: "",
iconCls: "",
el: {},
popup: {},
minWidth: 100,
@ -30,7 +30,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
var self = this, o = this.options;
this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger",
iconClass: o.iconClass,
iconCls: o.iconCls,
title: o.title,
items: o.items,
width: o.width,

14
src/case/combo/iconcombo/trigger.iconcombo.js

@ -10,7 +10,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
extraCls: "bi-icon-combo-trigger",
el: {},
items: [],
iconClass: "",
iconCls: "",
width: 25,
height: 25,
isShowDown: true
@ -22,7 +22,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
var o = this.options, self = this;
this.button = BI.createWidget(o.el, {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
disableSelected: true,
width: o.width,
height: o.height,
@ -60,7 +60,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
populate: function (items) {
var o = this.options;
this.options.items = items || [];
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
},
@ -68,19 +68,19 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
setValue: function (v) {
BI.IconComboTrigger.superclass.setValue.apply(this, arguments);
var o = this.options;
var iconClass = "";
var iconCls = "";
v = BI.isArray(v) ? v[0] : v;
if (BI.any(this.options.items, function (i, item) {
if (v === item.value) {
iconClass = item.iconClass;
iconCls = item.iconCls;
return true;
}
})) {
this.button.setIcon(iconClass);
this.button.setIcon(iconCls);
this.button.setSelected(true);
this.down.setSelected(true);
} else {
this.button.setIcon(o.iconClass);
this.button.setIcon(o.iconCls);
this.button.setSelected(false);
this.down.setSelected(false);
}

2
src/case/trigger/trigger.icon.text.js

@ -46,7 +46,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
items: [{
el: {
type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon " + o.iconClass,
cls: "icon-combo-trigger-icon " + o.iconCls,
ref: function (_ref) {
self.icon = _ref;
},

12
src/case/trigger/trigger.icon.text.select.js

@ -19,11 +19,11 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
type: "bi.icon_text_trigger",
element: this,
text: obj.text,
iconClass: obj.iconClass,
iconCls: obj.iconCls,
height: o.height
});
},
_digist: function (vals, items) {
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -33,7 +33,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.deepContains(vals, item.value)) {
result = {
text: item.text || item.value,
iconClass: item.iconClass
iconCls: item.iconCls
};
return true;
}
@ -42,12 +42,12 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
if (BI.isNotNull(result)) {
return {
text: result.text,
iconClass: result.iconClass
iconCls: result.iconCls
};
} else {
return {
text: o.text,
iconClass: ""
iconCls: ""
};
}
},
@ -55,7 +55,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {
setValue: function (vals) {
var obj = this._digist(vals, this.options.items);
this.trigger.setText(obj.text);
this.trigger.setIcon(obj.iconClass);
this.trigger.setIcon(obj.iconCls);
},
populate: function (items) {

3
src/widget/downlist/combo.downlist.js

@ -5,8 +5,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-down-list-combo",
invalid: false,
height: 25,
height: 24,
items: [],
adjustLength: 0,
direction: "bottom",

18
src/widget/numberinterval/numberinterval.js

@ -125,12 +125,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemin === true) {
@ -144,12 +144,12 @@ BI.NumberInterval = BI.inherit(BI.Single, {
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconClass: "less-font",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
value: 1,
iconClass: "less-equal-font"
iconCls: "less-equal-font"
}]
});
if (o.closemax === true) {
@ -265,7 +265,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
}
if (smallValue > bigValue) {
self.element.addClass("number-error");
@ -279,11 +279,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self.element.removeClass("number-error");
o.validation = "valid";
return "";
},
_setTitle: function (v) {

Loading…
Cancel
Save