Browse Source

Merge pull request #369 in FUI/fineui from ~WINDY/fui:master to master

* commit '6952497a525ba8ae278a996c3c59848b22292c90':
  update
  BI-18672 && BI-19143
es6
guy 6 years ago
parent
commit
8d5fbbbead
  1. 26
      dist/_fineui.min.js
  2. 48
      dist/bundle.js
  3. 24
      dist/bundle.min.js
  4. 26928
      dist/fineui.js
  5. 26
      dist/fineui.min.js
  6. 48
      dist/widget.js
  7. 24
      src/widget/dynamicdate/dynamicdate.trigger.js
  8. 24
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js

26
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

48
dist/bundle.js vendored

@ -91179,6 +91179,25 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
return BI.i18nText("BI-Date_Trigger_Error_Text");
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x-%e");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d");
}
}
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -91278,11 +91297,10 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;
},
_setInnerValue: function (date, text) {
_setInnerValue: function (date) {
var dateStr = date.print("%Y-%x-%e");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getText: function (obj) {
@ -91355,12 +91373,10 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
if (BI.isNull(value) || BI.isNull(value.day)) {
this.editor.setState("");
this.editor.setValue("");
this.setTitle("");
} else {
var dateStr = BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(dateStr);
}
break;
}
@ -92117,6 +92133,25 @@ BI.extend(BI.DynamicDateTimeSelect, {
return BI.i18nText("BI-Basic_Date_Time_Error_Text");
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x-%e %H:%M:%S");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0).print("%Y-%X-%d %H:%M:%S");
}
}
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -92219,11 +92254,10 @@ BI.extend(BI.DynamicDateTimeSelect, {
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;
},
_setInnerValue: function (date, text) {
_setInnerValue: function (date) {
var dateStr = date.print("%Y-%x-%e %H:%M:%S");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getText: function (obj) {
@ -92296,13 +92330,11 @@ BI.extend(BI.DynamicDateTimeSelect, {
if (BI.isNull(value) || BI.isNull(value.day)) {
this.editor.setState("");
this.editor.setValue("");
this.setTitle("");
} else {
var dateStr = BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0).print("%Y-%X-%d %H:%M:%S");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(dateStr);
}
break;
}

24
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

26928
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

26
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

48
dist/widget.js vendored

@ -3718,6 +3718,25 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
return BI.i18nText("BI-Date_Trigger_Error_Text");
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x-%e");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d");
}
}
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -3817,11 +3836,10 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;
},
_setInnerValue: function (date, text) {
_setInnerValue: function (date) {
var dateStr = date.print("%Y-%x-%e");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getText: function (obj) {
@ -3894,12 +3912,10 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
if (BI.isNull(value) || BI.isNull(value.day)) {
this.editor.setState("");
this.editor.setValue("");
this.setTitle("");
} else {
var dateStr = BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(dateStr);
}
break;
}
@ -4656,6 +4672,25 @@ BI.extend(BI.DynamicDateTimeSelect, {
return BI.i18nText("BI-Basic_Date_Time_Error_Text");
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x-%e %H:%M:%S");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0).print("%Y-%X-%d %H:%M:%S");
}
}
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -4758,11 +4793,10 @@ BI.extend(BI.DynamicDateTimeSelect, {
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;
},
_setInnerValue: function (date, text) {
_setInnerValue: function (date) {
var dateStr = date.print("%Y-%x-%e %H:%M:%S");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getText: function (obj) {
@ -4835,13 +4869,11 @@ BI.extend(BI.DynamicDateTimeSelect, {
if (BI.isNull(value) || BI.isNull(value.day)) {
this.editor.setState("");
this.editor.setValue("");
this.setTitle("");
} else {
var dateStr = BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0).print("%Y-%X-%d %H:%M:%S");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(dateStr);
}
break;
}

24
src/widget/dynamicdate/dynamicdate.trigger.js

@ -41,6 +41,25 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
return BI.i18nText("BI-Date_Trigger_Error_Text");
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x-%e");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d");
}
}
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -140,11 +159,10 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;
},
_setInnerValue: function (date, text) {
_setInnerValue: function (date) {
var dateStr = date.print("%Y-%x-%e");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getText: function (obj) {
@ -217,12 +235,10 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
if (BI.isNull(value) || BI.isNull(value.day)) {
this.editor.setState("");
this.editor.setValue("");
this.setTitle("");
} else {
var dateStr = BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(dateStr);
}
break;
}

24
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -41,6 +41,25 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
return BI.i18nText("BI-Basic_Date_Time_Error_Text");
}
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = date.print("%Y-%x-%e %H:%M:%S");
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0).print("%Y-%X-%d %H:%M:%S");
}
}
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -143,11 +162,10 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;
},
_setInnerValue: function (date, text) {
_setInnerValue: function (date) {
var dateStr = date.print("%Y-%x-%e %H:%M:%S");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
},
_getText: function (obj) {
@ -220,13 +238,11 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
if (BI.isNull(value) || BI.isNull(value.day)) {
this.editor.setState("");
this.editor.setValue("");
this.setTitle("");
} else {
var dateStr = BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0).print("%Y-%X-%d %H:%M:%S");
this.editor.setState(dateStr);
this.editor.setValue(dateStr);
this.setTitle(dateStr);
}
break;
}

Loading…
Cancel
Save