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