|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|