|
|
@ -38415,24 +38415,22 @@ BI.Single = BI.inherit(BI.Widget, { |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
_defaultConfig: function () { |
|
|
|
|
|
|
|
var conf = BI.Text.superclass._defaultConfig.apply(this, arguments); |
|
|
|
props: { |
|
|
|
return BI.extend(conf, { |
|
|
|
baseCls: "bi-text", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-text", |
|
|
|
textAlign: "left", |
|
|
|
textAlign: "left", |
|
|
|
whiteSpace: "normal", |
|
|
|
whiteSpace: "normal", |
|
|
|
lineHeight: null, |
|
|
|
lineHeight: null, |
|
|
|
handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的
|
|
|
|
handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的
|
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
|
rgap: 0, |
|
|
|
rgap: 0, |
|
|
|
tgap: 0, |
|
|
|
tgap: 0, |
|
|
|
bgap: 0, |
|
|
|
bgap: 0, |
|
|
|
text: "", |
|
|
|
text: "", |
|
|
|
py: "", |
|
|
|
py: "", |
|
|
|
highLight: false |
|
|
|
highLight: false |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
@ -47332,22 +47330,21 @@ BI.shortcut("bi.textarea_editor", BI.TextAreaEditor);/** |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.Html = BI.inherit(BI.Single, { |
|
|
|
BI.Html = BI.inherit(BI.Single, { |
|
|
|
_defaultConfig: function () { |
|
|
|
|
|
|
|
var conf = BI.Html.superclass._defaultConfig.apply(this, arguments); |
|
|
|
props: { |
|
|
|
return BI.extend(conf, { |
|
|
|
baseCls: "bi-html", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-text", |
|
|
|
textAlign: "left", |
|
|
|
textAlign: "left", |
|
|
|
whiteSpace: "normal", |
|
|
|
whiteSpace: "normal", |
|
|
|
lineHeight: null, |
|
|
|
lineHeight: null, |
|
|
|
handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的
|
|
|
|
handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的
|
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
|
rgap: 0, |
|
|
|
rgap: 0, |
|
|
|
tgap: 0, |
|
|
|
tgap: 0, |
|
|
|
bgap: 0, |
|
|
|
bgap: 0, |
|
|
|
text: "", |
|
|
|
text: "" |
|
|
|
highLight: false |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
@ -47403,16 +47400,15 @@ BI.Html = BI.inherit(BI.Single, { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.text = this; |
|
|
|
this.text = this; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (BI.isKey(o.text)) { |
|
|
|
if (BI.isKey(o.text)) { |
|
|
|
this.setText(o.text); |
|
|
|
this.setText(o.text); |
|
|
|
} else if (BI.isKey(o.value)) { |
|
|
|
} else if (BI.isKey(o.value)) { |
|
|
|
this.setText(o.value); |
|
|
|
this.setText(o.value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (o.highLight) { |
|
|
|
|
|
|
|
this.doHighLight(); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
doHighLight: function () { |
|
|
|
doHighLight: function () { |
|
|
@ -48681,42 +48677,45 @@ BI.Radio = BI.inherit(BI.BasicButton, { |
|
|
|
BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE"; |
|
|
|
BI.Radio.EVENT_CHANGE = "Radio.EVENT_CHANGE"; |
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.radio", BI.Radio);/** |
|
|
|
BI.shortcut("bi.radio", BI.Radio);/** |
|
|
|
* Created by GUY on 2015/6/26. |
|
|
|
* Created by dailer on 2019/6/19. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
BI.AbstractLabel = BI.inherit(BI.Single, { |
|
|
|
_defaultConfig: function () { |
|
|
|
|
|
|
|
var conf = BI.HtmlLabel.superclass._defaultConfig.apply(this, arguments); |
|
|
|
props: { |
|
|
|
return BI.extend(conf, { |
|
|
|
textAlign: "center", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-label", |
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
textAlign: "center", |
|
|
|
textWidth: null, |
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
textHeight: null, |
|
|
|
textWidth: null, |
|
|
|
hgap: 0, |
|
|
|
textHeight: null, |
|
|
|
vgap: 0, |
|
|
|
hgap: 0, |
|
|
|
lgap: 0, |
|
|
|
vgap: 0, |
|
|
|
rgap: 0, |
|
|
|
lgap: 0, |
|
|
|
tgap: 0, |
|
|
|
rgap: 0, |
|
|
|
bgap: 0, |
|
|
|
tgap: 0, |
|
|
|
text: "", |
|
|
|
bgap: 0, |
|
|
|
py: "", |
|
|
|
text: "" |
|
|
|
keyword: "", |
|
|
|
}); |
|
|
|
highLight: false |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_createJson: function () { |
|
|
|
_createJson: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.html", |
|
|
|
type: "bi.text", |
|
|
|
textAlign: o.textAlign, |
|
|
|
textAlign: o.textAlign, |
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
lineHeight: o.textHeight, |
|
|
|
lineHeight: o.textHeight, |
|
|
|
text: o.text, |
|
|
|
text: o.text, |
|
|
|
value: o.value |
|
|
|
value: o.value, |
|
|
|
|
|
|
|
py: o.py, |
|
|
|
|
|
|
|
keyword: o.keyword, |
|
|
|
|
|
|
|
highLight: o.highLight |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
BI.HtmlLabel.superclass._init.apply(this, arguments); |
|
|
|
BI.AbstractLabel.superclass._init.apply(this, arguments); |
|
|
|
|
|
|
|
|
|
|
|
if (this.options.textAlign === "center") { |
|
|
|
if (this.options.textAlign === "center") { |
|
|
|
this._createCenterEl(); |
|
|
|
this._createCenterEl(); |
|
|
@ -48728,6 +48727,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
_createCenterEl: function () { |
|
|
|
_createCenterEl: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var json = this._createJson(); |
|
|
|
var json = this._createJson(); |
|
|
|
|
|
|
|
json.textAlign = "left"; |
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
json.maxWidth = o.textWidth; |
|
|
|
json.maxWidth = o.textWidth; |
|
|
@ -48757,7 +48757,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (o.whiteSpace == "normal") { |
|
|
|
if (o.whiteSpace == "normal") { // 1.3
|
|
|
|
BI.extend(json, { |
|
|
|
BI.extend(json, { |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
|
vgap: o.vgap, |
|
|
|
vgap: o.vgap, |
|
|
@ -48775,10 +48775,11 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
|
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
"line-height": o.height + "px" |
|
|
|
"line-height": o.height + "px" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
@ -48790,7 +48791,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
})); |
|
|
|
})); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
BI.extend(json, { |
|
|
|
BI.extend(json, { // 1.5
|
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
|
vgap: o.vgap, |
|
|
|
vgap: o.vgap, |
|
|
|
lgap: o.lgap, |
|
|
|
lgap: o.lgap, |
|
|
@ -48808,7 +48809,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
|
|
|
|
json.maxWidth = o.textWidth; |
|
|
|
json.maxWidth = o.textWidth; |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.center_adapt", |
|
|
|
type: "bi.center_adapt", |
|
|
@ -48822,7 +48823,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (o.whiteSpace == "normal") { |
|
|
|
if (o.whiteSpace == "normal") { // 1.7
|
|
|
|
BI.extend(json, { |
|
|
|
BI.extend(json, { |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
|
vgap: o.vgap, |
|
|
|
vgap: o.vgap, |
|
|
@ -48840,10 +48841,11 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
|
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
"line-height": o.height + "px" |
|
|
|
"line-height": o.height + "px" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
@ -48881,7 +48883,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
json.width = o.textWidth; |
|
|
|
json.width = o.textWidth; |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
|
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: adaptLayout, |
|
|
|
type: adaptLayout, |
|
|
|
height: o.height, |
|
|
|
height: o.height, |
|
|
@ -48895,7 +48897,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ // 2.2
|
|
|
|
type: adaptLayout, |
|
|
|
type: adaptLayout, |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
@ -48913,7 +48915,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
@ -48931,7 +48933,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; |
|
|
|
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ // 2.4
|
|
|
|
type: adaptLayout, |
|
|
|
type: adaptLayout, |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
@ -48949,7 +48951,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
json.width = o.textWidth; |
|
|
|
json.width = o.textWidth; |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ // 2.5
|
|
|
|
type: adaptLayout, |
|
|
|
type: adaptLayout, |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
@ -48973,7 +48975,7 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
"line-height": o.height - (o.vgap * 2) + "px" |
|
|
|
"line-height": o.height - (o.vgap * 2) + "px" |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
this.text = BI.createWidget(BI.extend(json, { // 2.6
|
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
hgap: o.hgap, |
|
|
|
hgap: o.hgap, |
|
|
|
vgap: o.vgap, |
|
|
|
vgap: o.vgap, |
|
|
@ -49003,13 +49005,12 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_setEnable: function (enable) { |
|
|
|
doRedMark: function () { |
|
|
|
BI.HtmlLabel.superclass._setEnable.apply(this, arguments); |
|
|
|
this.text.doRedMark.apply(this.text, arguments); |
|
|
|
if (enable === true) { |
|
|
|
}, |
|
|
|
this.element.removeClass("base-disabled disabled"); |
|
|
|
|
|
|
|
} else if (enable === false) { |
|
|
|
unRedMark: function () { |
|
|
|
this.element.addClass("base-disabled disabled"); |
|
|
|
this.text.unRedMark.apply(this.text, arguments); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
doHighLight: function () { |
|
|
|
doHighLight: function () { |
|
|
@ -49034,14 +49035,46 @@ BI.HtmlLabel = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
BI.HtmlLabel.superclass.setValue.apply(this, arguments); |
|
|
|
BI.AbstractLabel.superclass.setValue.apply(this, arguments); |
|
|
|
if (!this.isReadOnly()) { |
|
|
|
if (!this.isReadOnly()) { |
|
|
|
this.text.setValue(v); |
|
|
|
this.text.setValue(v); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function () { |
|
|
|
populate: function () { |
|
|
|
BI.HtmlLabel.superclass.populate.apply(this, arguments); |
|
|
|
BI.AbstractLabel.superclass.populate.apply(this, arguments); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
});/** |
|
|
|
|
|
|
|
* Created by GUY on 2015/6/26. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.HtmlLabel = BI.inherit(BI.AbstractLabel, { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
|
|
|
baseCls: "bi-html-label", |
|
|
|
|
|
|
|
textAlign: "center", |
|
|
|
|
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
|
|
|
|
textWidth: null, |
|
|
|
|
|
|
|
textHeight: null, |
|
|
|
|
|
|
|
hgap: 0, |
|
|
|
|
|
|
|
vgap: 0, |
|
|
|
|
|
|
|
lgap: 0, |
|
|
|
|
|
|
|
rgap: 0, |
|
|
|
|
|
|
|
tgap: 0, |
|
|
|
|
|
|
|
bgap: 0, |
|
|
|
|
|
|
|
text: "" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_createJson: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: "bi.html", |
|
|
|
|
|
|
|
textAlign: o.textAlign, |
|
|
|
|
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
|
|
|
|
lineHeight: o.textHeight, |
|
|
|
|
|
|
|
text: o.text, |
|
|
|
|
|
|
|
value: o.value |
|
|
|
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -49090,26 +49123,24 @@ BI.shortcut("bi.icon_label", BI.IconLabel);/** |
|
|
|
* Created by GUY on 2015/6/26. |
|
|
|
* Created by GUY on 2015/6/26. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
BI.Label = BI.inherit(BI.Single, { |
|
|
|
BI.Label = BI.inherit(BI.AbstractLabel, { |
|
|
|
_defaultConfig: function () { |
|
|
|
|
|
|
|
var conf = BI.Label.superclass._defaultConfig.apply(this, arguments); |
|
|
|
props: { |
|
|
|
return BI.extend(conf, { |
|
|
|
baseCls: "bi-label", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-label", |
|
|
|
textAlign: "center", |
|
|
|
textAlign: "center", |
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
whiteSpace: "nowrap", // normal or nowrap
|
|
|
|
textWidth: null, |
|
|
|
textWidth: null, |
|
|
|
textHeight: null, |
|
|
|
textHeight: null, |
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
|
rgap: 0, |
|
|
|
rgap: 0, |
|
|
|
tgap: 0, |
|
|
|
tgap: 0, |
|
|
|
bgap: 0, |
|
|
|
bgap: 0, |
|
|
|
text: "", |
|
|
|
text: "", |
|
|
|
py: "", |
|
|
|
py: "", |
|
|
|
keyword: "", |
|
|
|
keyword: "", |
|
|
|
highLight: false |
|
|
|
highLight: false |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_createJson: function () { |
|
|
|
_createJson: function () { |
|
|
@ -49127,335 +49158,12 @@ BI.Label = BI.inherit(BI.Single, { |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
|
|
|
BI.Label.superclass._init.apply(this, arguments); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.options.textAlign === "center") { |
|
|
|
|
|
|
|
this._createCenterEl(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this._createNotCenterEl(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_createCenterEl: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
var json = this._createJson(); |
|
|
|
|
|
|
|
json.textAlign = "left"; |
|
|
|
|
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
|
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
|
|
|
|
json.maxWidth = o.textWidth; |
|
|
|
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 1.1
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
height: o.height, |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.createWidget({ // 1.2
|
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (o.whiteSpace == "normal") { // 1.3
|
|
|
|
|
|
|
|
BI.extend(json, { |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.text = BI.createWidget(json); |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [this.text] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 1.4
|
|
|
|
|
|
|
|
this.element.css({ |
|
|
|
|
|
|
|
"line-height": o.height + "px" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.extend(json, { // 1.5
|
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap, |
|
|
|
|
|
|
|
maxWidth: "100%" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.text = BI.createWidget(json); |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [this.text] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6
|
|
|
|
|
|
|
|
json.maxWidth = o.textWidth; |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (o.whiteSpace == "normal") { // 1.7
|
|
|
|
|
|
|
|
BI.extend(json, { |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.text = BI.createWidget(json); |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
scrollable: true, |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [this.text] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 1.8
|
|
|
|
|
|
|
|
this.element.css({ |
|
|
|
|
|
|
|
"line-height": o.height + "px" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
json.textAlign = o.textAlign; |
|
|
|
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.extend(json, { |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
|
|
|
|
maxWidth: "100%" |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [this.text] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_createNotCenterEl: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
var adaptLayout = o.textAlign === "right" ? "bi.right_vertical_adapt" : "bi.vertical_adapt"; |
|
|
|
|
|
|
|
var json = this._createJson(); |
|
|
|
|
|
|
|
if (BI.isNumber(o.width) && o.width > 0) { |
|
|
|
|
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
|
|
|
|
json.width = o.textWidth; |
|
|
|
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 2.1
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: adaptLayout, |
|
|
|
|
|
|
|
height: o.height, |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.createWidget({ // 2.2
|
|
|
|
|
|
|
|
type: adaptLayout, |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap, |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { // 2.3
|
|
|
|
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
if (o.whiteSpace !== "normal") { |
|
|
|
|
|
|
|
this.element.css({ |
|
|
|
|
|
|
|
"line-height": o.height - (o.vgap * 2) + "px" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
json.width = o.width - 2 * o.hgap - o.lgap - o.rgap; |
|
|
|
|
|
|
|
BI.createWidget({ // 2.4
|
|
|
|
|
|
|
|
type: adaptLayout, |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap, |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNumber(o.textWidth) && o.textWidth > 0) { |
|
|
|
|
|
|
|
json.width = o.textWidth; |
|
|
|
|
|
|
|
BI.createWidget({ // 2.5
|
|
|
|
|
|
|
|
type: adaptLayout, |
|
|
|
|
|
|
|
scrollable: o.whiteSpace === "normal", |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap, |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
el: (this.text = BI.createWidget(json)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (BI.isNumber(o.height) && o.height > 0) { |
|
|
|
|
|
|
|
if (o.whiteSpace !== "normal") { |
|
|
|
|
|
|
|
this.element.css({ |
|
|
|
|
|
|
|
"line-height": o.height - (o.vgap * 2) + "px" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { // 2.6
|
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BI.extend(json, { |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
vgap: o.vgap, |
|
|
|
|
|
|
|
lgap: o.lgap, |
|
|
|
|
|
|
|
rgap: o.rgap, |
|
|
|
|
|
|
|
tgap: o.tgap, |
|
|
|
|
|
|
|
bgap: o.bgap |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.text = BI.createWidget(BI.extend(json, { |
|
|
|
|
|
|
|
maxWidth: "100%" |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: adaptLayout, |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [this.text] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doRedMark: function () { |
|
|
|
doRedMark: function () { |
|
|
|
this.text.doRedMark.apply(this.text, arguments); |
|
|
|
this.text.doRedMark.apply(this.text, arguments); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
unRedMark: function () { |
|
|
|
unRedMark: function () { |
|
|
|
this.text.unRedMark.apply(this.text, arguments); |
|
|
|
this.text.unRedMark.apply(this.text, arguments); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doHighLight: function () { |
|
|
|
|
|
|
|
this.text.doHighLight.apply(this.text, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unHighLight: function () { |
|
|
|
|
|
|
|
this.text.unHighLight.apply(this.text, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setText: function (v) { |
|
|
|
|
|
|
|
this.options.text = v; |
|
|
|
|
|
|
|
this.text.setText(v); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getText: function () { |
|
|
|
|
|
|
|
return this.options.text; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setStyle: function (css) { |
|
|
|
|
|
|
|
this.text.setStyle(css); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
|
|
|
BI.Label.superclass.setValue.apply(this, arguments); |
|
|
|
|
|
|
|
if (!this.isReadOnly()) { |
|
|
|
|
|
|
|
this.text.setValue(v); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
populate: function () { |
|
|
|
|
|
|
|
BI.Label.superclass.populate.apply(this, arguments); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|