Browse Source

Merge pull request #914 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit 'b6f3f782c098c146b5a4a046da0103b14ca3a70b':
  build
  无JIRA任务 优化改用textContent来设置文本.以正则判断的方式判断是否需要htmlEncode,避免使用replaceAll
  build
  build
  无jira任务 BI.Text去掉在mouted中setText的逻辑,提高性能
es6
Dailer 6 years ago
parent
commit
a193cff956
  1. 128
      dist/2.0/fineui.ie.js
  2. 62
      dist/2.0/fineui.ie.min.js
  3. 128
      dist/2.0/fineui.js
  4. 58
      dist/2.0/fineui.min.js
  5. 26
      dist/base.js
  6. 128
      dist/bundle.ie.js
  7. 62
      dist/bundle.ie.min.js
  8. 128
      dist/bundle.js
  9. 58
      dist/bundle.min.js
  10. 21
      dist/core.js
  11. 128
      dist/fineui.ie.js
  12. 62
      dist/fineui.ie.min.js
  13. 128
      dist/fineui.js
  14. 58
      dist/fineui.min.js
  15. 128
      dist/fineui_without_jquery_polyfill.js
  16. 21
      dist/utils.js
  17. 4
      dist/utils.min.js
  18. 81
      dist/widget.js
  19. 26
      src/base/single/text.js
  20. 21
      src/core/alias.js

128
dist/2.0/fineui.ie.js vendored

@ -15919,21 +15919,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&",
"\"": """,
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// 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;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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];
},
// 判格式合法

62
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/2.0/fineui.js vendored

@ -15919,21 +15919,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode
@ -36480,7 +36475,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({
@ -36498,15 +36493,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);
@ -36521,6 +36508,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
@ -36556,7 +36549,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});
@ -61417,15 +61418,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 () {
@ -61442,16 +61443,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);
@ -63098,14 +63099,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"
},
@ -63141,8 +63142,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 () {
@ -63223,8 +63224,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;
@ -63993,14 +63994,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"
},
@ -64036,8 +64037,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 () {
@ -64118,8 +64119,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;
@ -80905,14 +80906,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 () {
@ -81034,7 +81035,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);
@ -81084,14 +81086,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 () {
@ -81213,7 +81215,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);
@ -82987,13 +82990,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 () {
@ -83100,7 +83103,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];
},
// 判格式合法

58
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

26
dist/base.js vendored

@ -582,7 +582,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({
@ -600,15 +600,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);
@ -623,6 +615,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
@ -658,7 +656,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});

128
dist/bundle.ie.js vendored

@ -15919,21 +15919,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// 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;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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];
},
// 判格式合法

62
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/bundle.js vendored

@ -15919,21 +15919,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode
@ -36480,7 +36475,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({
@ -36498,15 +36493,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);
@ -36521,6 +36508,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
@ -36556,7 +36549,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});
@ -61417,15 +61418,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 () {
@ -61442,16 +61443,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);
@ -63098,14 +63099,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"
},
@ -63141,8 +63142,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 () {
@ -63223,8 +63224,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;
@ -63993,14 +63994,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"
},
@ -64036,8 +64037,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 () {
@ -64118,8 +64119,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;
@ -80905,14 +80906,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 () {
@ -81034,7 +81035,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);
@ -81084,14 +81086,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 () {
@ -81213,7 +81215,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);
@ -82987,13 +82990,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 () {
@ -83100,7 +83103,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];
},
// 判格式合法

58
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

21
dist/core.js vendored

@ -15919,21 +15919,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode

128
dist/fineui.ie.js vendored

@ -16164,21 +16164,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode
@ -36321,7 +36316,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({
@ -36339,15 +36334,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);
@ -36362,6 +36349,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
@ -36397,7 +36390,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});
@ -61258,15 +61259,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 () {
@ -61283,16 +61284,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);
@ -62939,14 +62940,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"
},
@ -62982,8 +62983,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 () {
@ -63064,8 +63065,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;
@ -63834,14 +63835,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"
},
@ -63877,8 +63878,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 () {
@ -63959,8 +63960,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;
@ -80746,14 +80747,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 () {
@ -80875,7 +80876,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);
@ -80925,14 +80927,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 () {
@ -81054,7 +81056,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);
@ -82828,13 +82831,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 () {
@ -82941,7 +82944,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];
},
// 判格式合法

62
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/fineui.js vendored

@ -16164,21 +16164,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode
@ -36725,7 +36720,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({
@ -36743,15 +36738,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);
@ -36766,6 +36753,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
@ -36801,7 +36794,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});
@ -61662,15 +61663,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 () {
@ -61687,16 +61688,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);
@ -63343,14 +63344,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"
},
@ -63386,8 +63387,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 () {
@ -63468,8 +63469,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;
@ -64238,14 +64239,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"
},
@ -64281,8 +64282,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 () {
@ -64363,8 +64364,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;
@ -81150,14 +81151,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 () {
@ -81279,7 +81280,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);
@ -81329,14 +81331,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 () {
@ -81458,7 +81460,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);
@ -83232,13 +83235,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 () {
@ -83345,7 +83348,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];
},
// 判格式合法

58
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

128
dist/fineui_without_jquery_polyfill.js vendored

@ -15665,21 +15665,16 @@ BI.ShowAction = BI.inherit(BI.Action, {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode
@ -25156,7 +25151,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({
@ -25174,15 +25169,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);
@ -25197,6 +25184,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
@ -25232,7 +25225,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});
@ -44054,15 +44055,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 () {
@ -44079,16 +44080,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);
@ -45735,14 +45736,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"
},
@ -45778,8 +45779,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 () {
@ -45860,8 +45861,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;
@ -46630,14 +46631,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"
},
@ -46673,8 +46674,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 () {
@ -46755,8 +46756,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;
@ -63542,14 +63543,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 () {
@ -63671,7 +63672,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);
@ -63721,14 +63723,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 () {
@ -63850,7 +63852,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);
@ -65624,13 +65627,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 () {
@ -65737,7 +65740,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];
},
// 判格式合法

21
dist/utils.js vendored

@ -12884,21 +12884,16 @@ if (!_global.BI) {
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

81
dist/widget.js vendored

@ -1022,15 +1022,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 () {
@ -1047,16 +1047,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);
@ -2703,14 +2703,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"
},
@ -2746,8 +2746,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 () {
@ -2828,8 +2828,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;
@ -3598,14 +3598,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"
},
@ -3641,8 +3641,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 () {
@ -3723,8 +3723,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;
@ -20510,14 +20510,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 () {
@ -20639,7 +20639,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);
@ -20689,14 +20690,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 () {
@ -20818,7 +20819,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);
@ -22592,13 +22594,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 () {
@ -22705,7 +22707,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];
},
// 判格式合法

26
src/base/single/text.js

@ -55,7 +55,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({
@ -73,15 +73,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);
@ -96,6 +88,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
@ -131,7 +129,15 @@ BI.Text = BI.inherit(BI.Single, {
setText: function (text) {
BI.Text.superclass.setText.apply(this, arguments);
this.options.text = text;
this.text.element.html(BI.htmlEncode(this._getShowText()));
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();
}
}
});

21
src/core/alias.js

@ -411,21 +411,16 @@
};
// replace the html special tags
var SPECIAL_TAGS = {
"&": "&amp;",
"\"": "&quot;",
"<": "&lt;",
">": "&gt;",
" ": "&nbsp;"
};
BI.htmlEncode = function (text) {
return BI.isNull(text) ? "" : BI.replaceAll(text + "", "&|\"|<|>|\\s", function (v) {
switch (v) {
case "&":
return "&amp;";
case "\"":
return "&quot;";
case "<":
return "&lt;";
case ">":
return "&gt;";
case " ":
default:
return "&nbsp;";
}
return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : "&nbsp;";
});
};
// html decode

Loading…
Cancel
Save