|
|
|
@ -36,7 +36,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
BI.NumberInterval.superclass._init.apply(this, arguments); |
|
|
|
|
this.smallEditor = BI.createWidget({ |
|
|
|
|
type: "bi.number_interval_single_editor", |
|
|
|
|
height: o.height - (o.simple ? 1 : 2), |
|
|
|
|
height: BI.pixFormat(o.height, o.simple ? 1 : 2), |
|
|
|
|
watermark: o.watermark, |
|
|
|
|
allowBlank: o.allowBlank, |
|
|
|
|
value: o.min, |
|
|
|
@ -61,7 +61,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
this.smallTip = BI.createWidget({ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: o.numTip, |
|
|
|
|
height: o.height - (o.simple ? 1 : 2), |
|
|
|
|
height: BI.pixFormat(o.height, o.simple ? 1 : 2), |
|
|
|
|
invisible: true |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
@ -76,7 +76,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
|
|
|
|
|
this.bigEditor = BI.createWidget({ |
|
|
|
|
type: "bi.number_interval_single_editor", |
|
|
|
|
height: o.height - (o.simple ? 1 : 2), |
|
|
|
|
height: BI.pixFormat(o.height, o.simple ? 1 : 2), |
|
|
|
|
watermark: o.watermark, |
|
|
|
|
allowBlank: o.allowBlank, |
|
|
|
|
value: o.max, |
|
|
|
@ -99,7 +99,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
this.bigTip = BI.createWidget({ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: o.numTip, |
|
|
|
|
height: o.height - (o.simple ? 1 : 2), |
|
|
|
|
height: BI.pixFormat(o.height, o.simple ? 1 : 2), |
|
|
|
|
invisible: true |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
@ -114,7 +114,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
this.smallCombo = BI.createWidget({ |
|
|
|
|
type: "bi.icon_combo", |
|
|
|
|
cls: "number-interval-small-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-right bi-border-corner-right-radius"), |
|
|
|
|
height: o.height - (o.simple ? 0 : 2), |
|
|
|
|
height: BI.pixFormat(o.height, o.simple ? 0 : 2), |
|
|
|
|
width: BI.pixFormat(c.width, c.border), |
|
|
|
|
items: [{ |
|
|
|
|
text: "(" + BI.i18nText("BI-Less_Than") + ")", |
|
|
|
|
iconCls: "less-font", |
|
|
|
@ -133,7 +134,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
this.bigCombo = BI.createWidget({ |
|
|
|
|
type: "bi.icon_combo", |
|
|
|
|
cls: "number-interval-big-combo" + (o.simple ? "" : " bi-border-top bi-border-bottom bi-border-left bi-border-corner-left-radius"), |
|
|
|
|
height: o.height - (o.simple ? 0 : 2), |
|
|
|
|
height: BI.pixFormat(o.height, o.simple ? 0 : 2), |
|
|
|
|
width: BI.pixFormat(c.width, c.border), |
|
|
|
|
items: [{ |
|
|
|
|
text: "(" + BI.i18nText("BI-Less_Than") + ")", |
|
|
|
|
iconCls: "less-font", |
|
|
|
@ -152,71 +154,83 @@ BI.NumberInterval = BI.inherit(BI.Single, {
|
|
|
|
|
this.label = BI.createWidget({ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: BI.i18nText("BI-Basic_Value"), |
|
|
|
|
textHeight: o.height - (o.simple ? 0 : c.border * 2), |
|
|
|
|
width: c.width - (o.simple ? 0 : c.border * 2), |
|
|
|
|
height: o.height - (o.simple ? 0 : c.border * 2), |
|
|
|
|
textHeight: o.height, |
|
|
|
|
// width: BI.pixFormat(o.width, o.simple ? 0 : c.border * 2),
|
|
|
|
|
hgap: 5, |
|
|
|
|
height: o.height, |
|
|
|
|
level: "warning", |
|
|
|
|
tipType: "warning" |
|
|
|
|
}); |
|
|
|
|
this.left = BI.createWidget({ |
|
|
|
|
type: "bi.htape", |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
columnSize: ["fill", ""], |
|
|
|
|
items: [{ |
|
|
|
|
el: self.smallEditor |
|
|
|
|
}, { |
|
|
|
|
el: self.smallCombo, |
|
|
|
|
width: c.width - c.border |
|
|
|
|
}] |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
this.right = BI.createWidget({ |
|
|
|
|
type: "bi.htape", |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
columnSize: ["", "fill"], |
|
|
|
|
items: [{ |
|
|
|
|
el: self.bigCombo, |
|
|
|
|
width: c.width - c.border |
|
|
|
|
}, { |
|
|
|
|
el: self.bigEditor, |
|
|
|
|
// BI-23883 间距考虑边框
|
|
|
|
|
lgap: 1 |
|
|
|
|
// lgap: 1
|
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
element: self, |
|
|
|
|
type: "bi.center", |
|
|
|
|
hgap: 15, |
|
|
|
|
height: o.height, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
columnSize: ["fill", "", "fill"], |
|
|
|
|
items: [{ |
|
|
|
|
el: self.left, |
|
|
|
|
left: -15, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
el: self.left |
|
|
|
|
}, { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: self.right, |
|
|
|
|
left: 0, |
|
|
|
|
right: -15, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
el: self.label |
|
|
|
|
}, { |
|
|
|
|
el: self.right |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
element: self, |
|
|
|
|
type: "bi.horizontal_auto", |
|
|
|
|
items: [ |
|
|
|
|
self.label |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// BI.createWidget({
|
|
|
|
|
// element: self,
|
|
|
|
|
// type: "bi.horizontal_auto",
|
|
|
|
|
// items: [
|
|
|
|
|
// self.label
|
|
|
|
|
// ]
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// BI.createWidget({
|
|
|
|
|
// element: self,
|
|
|
|
|
// type: "bi.center",
|
|
|
|
|
// hgap: 15,
|
|
|
|
|
// height: o.height,
|
|
|
|
|
// items: [
|
|
|
|
|
// {
|
|
|
|
|
// type: "bi.absolute",
|
|
|
|
|
// items: [{
|
|
|
|
|
// el: self.left,
|
|
|
|
|
// left: -15,
|
|
|
|
|
// right: 0,
|
|
|
|
|
// top: 0,
|
|
|
|
|
// bottom: 0
|
|
|
|
|
// }]
|
|
|
|
|
// }, {
|
|
|
|
|
// type: "bi.absolute",
|
|
|
|
|
// items: [{
|
|
|
|
|
// el: self.right,
|
|
|
|
|
// left: 0,
|
|
|
|
|
// right: -15,
|
|
|
|
|
// top: 0,
|
|
|
|
|
// bottom: 0
|
|
|
|
|
// }]
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
self._setValidEvent(self.bigEditor, c.bigEditor); |
|
|
|
|
self._setValidEvent(self.smallEditor, c.smallEditor); |
|
|
|
|