Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~claire.tang/fineui

es6
Claire 2 years ago
parent
commit
4682d97e59
  1. 2
      package.json
  2. 4
      src/case/button/node/node.arrow.js
  3. 2
      src/case/button/node/node.icon.arrow.js
  4. 12
      src/case/checkbox/check.arrownode.js
  5. 7
      src/case/layer/panel.js
  6. 26
      src/widget/numberinterval/numberinterval.js

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20220603194706", "version": "2.0.20220605160539",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

4
src/case/button/node/node.arrow.js

@ -17,7 +17,9 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.checkbox = BI.createWidget({ this.checkbox = BI.createWidget({
type: "bi.arrow_group_node_checkbox" type: "bi.arrow_group_node_checkbox",
expandIcon: o.expandIcon,
collapseIcon: o.collapseIcon,
}); });
return { return {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",

2
src/case/button/node/node.icon.arrow.js

@ -29,6 +29,8 @@ BI.IconArrowNode = BI.inherit(BI.NodeButton, {
var self = this, o = this.options; var self = this, o = this.options;
this.checkbox = BI.createWidget({ this.checkbox = BI.createWidget({
type: "bi.arrow_group_node_checkbox", type: "bi.arrow_group_node_checkbox",
expandIcon: o.expandIcon,
collapseIcon: o.collapseIcon,
width: 24, width: 24,
stopPropagation: true stopPropagation: true
}); });

12
src/case/checkbox/check.arrownode.js

@ -4,17 +4,21 @@
*/ */
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), { var conf = BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments);
extraCls: "bi-arrow-group-node-checkbox expander-right-font" return BI.extend(conf, {
extraCls: "bi-arrow-group-node-checkbox " + (conf.collapseIcon || "expander-right-font"),
expandIcon: "expander-down-font",
collapseIcon: "expander-right-font"
}); });
}, },
setSelected: function (v) { setSelected: function (v) {
var o = this.options;
BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) { if(v) {
this.element.removeClass("expander-right-font").addClass("expander-down-font"); this.element.removeClass(o.collapseIcon).addClass(o.expandIcon);
} else { } else {
this.element.removeClass("expander-down-font").addClass("expander-right-font"); this.element.removeClass(o.expandIcon).addClass(o.collapseIcon);
} }
} }
}); });

7
src/case/layer/panel.js

@ -8,6 +8,7 @@ BI.Panel = BI.inherit(BI.Widget, {
return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-panel bi-border", baseCls: "bi-panel bi-border",
title: "", title: "",
titleHeight: 30,
titleButtons: [], titleButtons: [],
el: {}, el: {},
logic: { logic: {
@ -34,7 +35,7 @@ BI.Panel = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
cls: "panel-title-text", cls: "panel-title-text",
text: o.title, text: o.title,
height: 30 height: o.titleHeight
}); });
this.button_group = BI.createWidget({ this.button_group = BI.createWidget({
@ -58,7 +59,7 @@ BI.Panel = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.left_right_vertical_adapt", type: "bi.left_right_vertical_adapt",
cls: "panel-title bi-header-background bi-border-bottom", cls: "panel-title bi-header-background bi-border-bottom",
height: 29, height: o.titleHeight - 1,
items: { items: {
left: [this.text], left: [this.text],
right: [this.button_group] right: [this.button_group]
@ -66,7 +67,7 @@ BI.Panel = BI.inherit(BI.Widget, {
lhgap: 10, lhgap: 10,
rhgap: 10 rhgap: 10
}, },
height: 29 height: o.titleHeight - 1
}; };
}, },

26
src/widget/numberinterval/numberinterval.js

@ -36,7 +36,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
BI.NumberInterval.superclass._init.apply(this, arguments); BI.NumberInterval.superclass._init.apply(this, arguments);
this.smallEditor = BI.createWidget({ this.smallEditor = BI.createWidget({
type: "bi.number_interval_single_editor", type: "bi.number_interval_single_editor",
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
watermark: o.watermark, watermark: o.watermark,
allowBlank: o.allowBlank, allowBlank: o.allowBlank,
value: o.min, value: o.min,
@ -55,13 +55,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "number-interval-small-editor bi-border" cls: "number-interval-small-editor " + (o.simple ? "bi-border-bottom" : "bi-border")
}); });
this.smallTip = BI.createWidget({ this.smallTip = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.numTip, text: o.numTip,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
invisible: true invisible: true
}); });
BI.createWidget({ BI.createWidget({
@ -76,7 +76,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigEditor = BI.createWidget({ this.bigEditor = BI.createWidget({
type: "bi.number_interval_single_editor", type: "bi.number_interval_single_editor",
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
watermark: o.watermark, watermark: o.watermark,
allowBlank: o.allowBlank, allowBlank: o.allowBlank,
value: o.max, value: o.max,
@ -93,13 +93,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
return true; return true;
}, },
cls: "number-interval-big-editor bi-border" cls: "number-interval-big-editor" + (o.simple ? " bi-border-bottom" : " bi-border")
}); });
this.bigTip = BI.createWidget({ this.bigTip = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.numTip, text: o.numTip,
height: o.height - 2, height: o.height - (o.simple ? 1 : 2),
invisible: true invisible: true
}); });
BI.createWidget({ BI.createWidget({
@ -113,8 +113,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}); });
this.smallCombo = BI.createWidget({ this.smallCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "number-interval-small-combo bi-border-top bi-border-bottom bi-border-right", cls: "number-interval-small-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right"),
height: o.height - 2, height: o.height - (o.simple ? 0 : 2),
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font", iconCls: "less-font",
@ -132,8 +132,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
this.bigCombo = BI.createWidget({ this.bigCombo = BI.createWidget({
type: "bi.icon_combo", type: "bi.icon_combo",
cls: "number-interval-big-combo bi-border-top bi-border-bottom bi-border-left", cls: "number-interval-big-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left"),
height: o.height - 2, height: o.height - (o.simple ? 0 : 2),
items: [{ items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")", text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font", iconCls: "less-font",
@ -152,9 +152,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.label = BI.createWidget({ this.label = BI.createWidget({
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Basic_Value"), text: BI.i18nText("BI-Basic_Value"),
textHeight: o.height - c.border * 2, textHeight: o.height - (o.simple ? 0 : c.border * 2),
width: c.width - c.border * 2, width: c.width - (o.simple ? 0 : c.border * 2),
height: o.height - c.border * 2, height: o.height - (o.simple ? 0 : c.border * 2),
level: "warning", level: "warning",
tipType: "warning" tipType: "warning"
}); });

Loading…
Cancel
Save