|
|
|
@ -15919,21 +15919,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// replace the html special tags
|
|
|
|
|
var SPECIAL_TAGS = { |
|
|
|
|
"&": "&", |
|
|
|
|
"\"": """, |
|
|
|
|
"<": "<", |
|
|
|
|
">": ">", |
|
|
|
|
" ": " " |
|
|
|
|
}; |
|
|
|
|
BI.htmlEncode = function (text) { |
|
|
|
|
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) { |
|
|
|
|
switch (v) { |
|
|
|
|
case "&": |
|
|
|
|
return "&"; |
|
|
|
|
case "\"": |
|
|
|
|
return """; |
|
|
|
|
case "<": |
|
|
|
|
return "<"; |
|
|
|
|
case ">": |
|
|
|
|
return ">"; |
|
|
|
|
case " ": |
|
|
|
|
default: |
|
|
|
|
return " "; |
|
|
|
|
} |
|
|
|
|
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : " "; |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// html decode
|
|
|
|
@ -36076,7 +36071,7 @@ BI.Text = BI.inherit(BI.Single, {
|
|
|
|
|
this.element.css({ |
|
|
|
|
textAlign: o.textAlign, |
|
|
|
|
whiteSpace: o.whiteSpace, |
|
|
|
|
textOverflow: o.whiteSpace === 'nowrap' ? "ellipsis" : "", |
|
|
|
|
textOverflow: o.whiteSpace === "nowrap" ? "ellipsis" : "" |
|
|
|
|
}); |
|
|
|
|
if (o.handler) { |
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
@ -36094,15 +36089,7 @@ BI.Text = BI.inherit(BI.Single, {
|
|
|
|
|
} else { |
|
|
|
|
this.text = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getShowText: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
return BI.isFunction(o.text) ? o.text() : o.text; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
mounted: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
var text = this._getShowText(); |
|
|
|
|
if (BI.isKey(text)) { |
|
|
|
|
this.setText(text); |
|
|
|
@ -36117,6 +36104,12 @@ BI.Text = BI.inherit(BI.Single, {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getShowText: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
return BI.isFunction(o.text) ? o.text() : o.text; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doRedMark: function (keyword) { |
|
|
|
|
var o = this.options; |
|
|
|
|
// render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword
|
|
|
|
@ -36152,7 +36145,15 @@ BI.Text = BI.inherit(BI.Single, {
|
|
|
|
|
setText: function (text) { |
|
|
|
|
BI.Text.superclass.setText.apply(this, arguments); |
|
|
|
|
this.options.text = text; |
|
|
|
|
if (BI.isIE9Below()) { |
|
|
|
|
this.text.element.html(BI.htmlEncode(this._getShowText())); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (/&|\"|<|>|\\s/.test(text)) { |
|
|
|
|
this.text.element[0].textContent = BI.htmlEncode(this._getShowText()); |
|
|
|
|
} else { |
|
|
|
|
this.text.element[0].textContent = this._getShowText(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -61013,15 +61014,15 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
popupHeight: 290, |
|
|
|
|
popupWidth: 270, |
|
|
|
|
comboAdjustHeight: 1, |
|
|
|
|
border: 1, |
|
|
|
|
DATE_MIN_VALUE: "1900-01-01", |
|
|
|
|
DATE_MAX_VALUE: "2099-12-31" |
|
|
|
|
border: 1 |
|
|
|
|
}, |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
baseCls: "bi-date-time-combo bi-border bi-border-radius", |
|
|
|
|
width: 200, |
|
|
|
|
height: 24 |
|
|
|
|
height: 24, |
|
|
|
|
minDate: "1900-01-01", |
|
|
|
|
maxDate: "2099-12-31" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
_init: function () { |
|
|
|
@ -61038,16 +61039,16 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
}; |
|
|
|
|
this.trigger = BI.createWidget({ |
|
|
|
|
type: "bi.date_time_trigger", |
|
|
|
|
min: this.constants.DATE_MIN_VALUE, |
|
|
|
|
max: this.constants.DATE_MAX_VALUE, |
|
|
|
|
min: opts.minDate, |
|
|
|
|
max: opts.maxDate, |
|
|
|
|
value: opts.value |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.popup = BI.createWidget({ |
|
|
|
|
type: "bi.date_time_popup", |
|
|
|
|
behaviors: opts.behaviors, |
|
|
|
|
min: this.constants.DATE_MIN_VALUE, |
|
|
|
|
max: this.constants.DATE_MAX_VALUE, |
|
|
|
|
min: opts.minDate, |
|
|
|
|
max: opts.maxDate, |
|
|
|
|
value: opts.value |
|
|
|
|
}); |
|
|
|
|
self.setValue(this.storeValue); |
|
|
|
@ -62694,14 +62695,14 @@ BI.extend(BI.DynamicDateCard, {
|
|
|
|
|
popupHeight: 259, |
|
|
|
|
popupWidth: 270, |
|
|
|
|
comboAdjustHeight: 1, |
|
|
|
|
border: 1, |
|
|
|
|
DATE_MIN_VALUE: "1900-01-01", |
|
|
|
|
DATE_MAX_VALUE: "2099-12-31" |
|
|
|
|
border: 1 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius", |
|
|
|
|
height: 22 |
|
|
|
|
height: 22, |
|
|
|
|
minDate: "1900-01-01", |
|
|
|
|
maxDate: "2099-12-31" |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -62737,8 +62738,8 @@ BI.extend(BI.DynamicDateCard, {
|
|
|
|
|
isNeedAdjustWidth: false, |
|
|
|
|
el: { |
|
|
|
|
type: "bi.dynamic_date_trigger", |
|
|
|
|
min: this.constants.DATE_MIN_VALUE, |
|
|
|
|
max: this.constants.DATE_MAX_VALUE, |
|
|
|
|
min: opts.minDate, |
|
|
|
|
max: opts.maxDate, |
|
|
|
|
height: opts.height, |
|
|
|
|
value: opts.value, |
|
|
|
|
ref: function () { |
|
|
|
@ -62819,8 +62820,8 @@ BI.extend(BI.DynamicDateCard, {
|
|
|
|
|
el: { |
|
|
|
|
type: "bi.dynamic_date_popup", |
|
|
|
|
behaviors: opts.behaviors, |
|
|
|
|
min: this.constants.DATE_MIN_VALUE, |
|
|
|
|
max: this.constants.DATE_MAX_VALUE, |
|
|
|
|
min: opts.minDate, |
|
|
|
|
max: opts.maxDate, |
|
|
|
|
value: opts.value, |
|
|
|
|
ref: function () { |
|
|
|
|
self.popup = this; |
|
|
|
@ -63589,14 +63590,14 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
popupHeight: 259, |
|
|
|
|
popupWidth: 270, |
|
|
|
|
comboAdjustHeight: 1, |
|
|
|
|
border: 1, |
|
|
|
|
DATE_MIN_VALUE: "1900-01-01", |
|
|
|
|
DATE_MAX_VALUE: "2099-12-31" |
|
|
|
|
border: 1 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", |
|
|
|
|
height: 22 |
|
|
|
|
height: 22, |
|
|
|
|
minDate: "1900-01-01", |
|
|
|
|
maxDate: "2099-12-31" |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63632,8 +63633,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
isNeedAdjustWidth: false, |
|
|
|
|
el: { |
|
|
|
|
type: "bi.dynamic_date_time_trigger", |
|
|
|
|
min: this.constants.DATE_MIN_VALUE, |
|
|
|
|
max: this.constants.DATE_MAX_VALUE, |
|
|
|
|
min: opts.minDate, |
|
|
|
|
max: opts.maxDate, |
|
|
|
|
height: opts.height, |
|
|
|
|
value: opts.value, |
|
|
|
|
ref: function () { |
|
|
|
@ -63714,8 +63715,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
|
|
|
|
|
el: { |
|
|
|
|
type: "bi.dynamic_date_time_popup", |
|
|
|
|
behaviors: opts.behaviors, |
|
|
|
|
min: this.constants.DATE_MIN_VALUE, |
|
|
|
|
max: this.constants.DATE_MAX_VALUE, |
|
|
|
|
min: opts.minDate, |
|
|
|
|
max: opts.maxDate, |
|
|
|
|
value: opts.value, |
|
|
|
|
ref: function () { |
|
|
|
|
self.popup = this; |
|
|
|
@ -80501,14 +80502,14 @@ BI.DateInterval = BI.inherit(BI.Single, {
|
|
|
|
|
width: 24, |
|
|
|
|
lgap: 15, |
|
|
|
|
offset: 0, |
|
|
|
|
timeErrorCls: "time-error", |
|
|
|
|
DATE_MIN_VALUE: "1900-01-01", |
|
|
|
|
DATE_MAX_VALUE: "2099-12-31" |
|
|
|
|
timeErrorCls: "time-error" |
|
|
|
|
}, |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
var conf = BI.DateInterval.superclass._defaultConfig.apply(this, arguments); |
|
|
|
|
return BI.extend(conf, { |
|
|
|
|
extraCls: "bi-date-interval" |
|
|
|
|
extraCls: "bi-date-interval", |
|
|
|
|
minDate: "1900-01-01", |
|
|
|
|
maxDate: "2099-12-31" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
_init: function () { |
|
|
|
@ -80630,7 +80631,8 @@ BI.DateInterval = BI.inherit(BI.Single, {
|
|
|
|
|
BI.print(BI.parseDateTime(date, "%Y-%X-%e"), "%Y-%X-%e") === date; |
|
|
|
|
}, |
|
|
|
|
_checkVoid: function (obj) { |
|
|
|
|
return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.constants.DATE_MIN_VALUE, this.constants.DATE_MAX_VALUE)[0]; |
|
|
|
|
var o = this.options; |
|
|
|
|
return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0]; |
|
|
|
|
}, |
|
|
|
|
_check: function (smallDate, bigDate) { |
|
|
|
|
var smallObj = smallDate.match(/\d+/g), bigObj = bigDate.match(/\d+/g); |
|
|
|
@ -80680,14 +80682,14 @@ BI.TimeInterval = BI.inherit(BI.Single, {
|
|
|
|
|
width: 24, |
|
|
|
|
lgap: 15, |
|
|
|
|
offset: 0, |
|
|
|
|
timeErrorCls: "time-error", |
|
|
|
|
DATE_MIN_VALUE: "1900-01-01", |
|
|
|
|
DATE_MAX_VALUE: "2099-12-31" |
|
|
|
|
timeErrorCls: "time-error" |
|
|
|
|
}, |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
var conf = BI.TimeInterval.superclass._defaultConfig.apply(this, arguments); |
|
|
|
|
return BI.extend(conf, { |
|
|
|
|
extraCls: "bi-time-interval" |
|
|
|
|
extraCls: "bi-time-interval", |
|
|
|
|
minDate: "1900-01-01", |
|
|
|
|
maxDate: "2099-12-31" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
_init: function () { |
|
|
|
@ -80809,7 +80811,8 @@ BI.TimeInterval = BI.inherit(BI.Single, {
|
|
|
|
|
BI.print(BI.parseDateTime(date, "%Y-%X-%e %H:%M:%S"), "%Y-%X-%e %H:%M:%S") === date; |
|
|
|
|
}, |
|
|
|
|
_checkVoid: function (obj) { |
|
|
|
|
return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.constants.DATE_MIN_VALUE, this.constants.DATE_MAX_VALUE)[0]; |
|
|
|
|
var o = this.options; |
|
|
|
|
return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0]; |
|
|
|
|
}, |
|
|
|
|
_check: function (smallDate, bigDate) { |
|
|
|
|
var smallObj = smallDate.match(/\d+/g), bigObj = bigDate.match(/\d+/g); |
|
|
|
@ -82583,13 +82586,13 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
|
|
|
|
|
width: 25, |
|
|
|
|
lgap: 15, |
|
|
|
|
offset: -15, |
|
|
|
|
timeErrorCls: "time-error", |
|
|
|
|
DATE_MIN_VALUE: "1900-01-01", |
|
|
|
|
DATE_MAX_VALUE: "2099-12-31" |
|
|
|
|
timeErrorCls: "time-error" |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
extraCls: "bi-year-month-interval" |
|
|
|
|
extraCls: "bi-year-month-interval", |
|
|
|
|
minDate: "1900-01-01", |
|
|
|
|
maxDate: "2099-12-31" |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
@ -82696,7 +82699,8 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
|
|
|
|
|
|
|
|
|
|
// 判是否在最大最小之间
|
|
|
|
|
_checkVoid: function (obj) { |
|
|
|
|
return !BI.checkDateVoid(obj.year, obj.month, 1, this.constants.DATE_MIN_VALUE, this.constants.DATE_MAX_VALUE)[0]; |
|
|
|
|
var o = this.options; |
|
|
|
|
return !BI.checkDateVoid(obj.year, obj.month, 1, o.minDate, o.maxDate)[0]; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 判格式合法
|
|
|
|
|