|
|
@ -109309,6 +109309,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
height: 24 |
|
|
|
height: 24 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
beforeInit: function (callback) { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
|
|
|
o.title = BI.bind(this._titleCreator, this); |
|
|
|
|
|
|
|
callback(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); |
|
|
|
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
@ -109416,6 +109422,27 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
return editor; |
|
|
|
return editor; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_titleCreator: function () { |
|
|
|
|
|
|
|
var storeValue = this.storeValue || {}; |
|
|
|
|
|
|
|
var type = storeValue.type || BI.DynamicDateCombo.Static; |
|
|
|
|
|
|
|
var value = storeValue.value; |
|
|
|
|
|
|
|
if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) { |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch (type) { |
|
|
|
|
|
|
|
case BI.DynamicDateCombo.Dynamic: |
|
|
|
|
|
|
|
var text = this._getText(value); |
|
|
|
|
|
|
|
var date = BI.getDate(); |
|
|
|
|
|
|
|
date = BI.DynamicDateHelper.getCalculation(value); |
|
|
|
|
|
|
|
var dateStr = date.print("%Y-%x"); |
|
|
|
|
|
|
|
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr); |
|
|
|
|
|
|
|
case BI.DynamicDateCombo.Static: |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
value = value || {}; |
|
|
|
|
|
|
|
return this._getStaticTitle(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_doEditorConfirm: function (editor) { |
|
|
|
_doEditorConfirm: function (editor) { |
|
|
|
var value = editor.getValue(); |
|
|
|
var value = editor.getValue(); |
|
|
|
if (BI.isNotNull(value)) { |
|
|
|
if (BI.isNotNull(value)) { |
|
|
@ -109429,7 +109456,6 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue |
|
|
|
month: BI.isEmptyString(this.monthEditor.getValue()) ? "" : monthValue |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.setTitle(this._getStaticTitle(this.storeValue.value)); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_yearCheck: function (v) { |
|
|
|
_yearCheck: function (v) { |
|
|
@ -109460,10 +109486,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_setInnerValue: function (date, text) { |
|
|
|
_setInnerValue: function (date, text) { |
|
|
|
var dateStr = date.print("%Y-%x"); |
|
|
|
|
|
|
|
this.yearEditor.setValue(date.getFullYear()); |
|
|
|
this.yearEditor.setValue(date.getFullYear()); |
|
|
|
this.monthEditor.setValue(date.getMonth() + 1); |
|
|
|
this.monthEditor.setValue(date.getMonth() + 1); |
|
|
|
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_getStaticTitle: function (value) { |
|
|
|
_getStaticTitle: function (value) { |
|
|
@ -109492,10 +109516,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
value = value || {}; |
|
|
|
value = value || {}; |
|
|
|
var month = BI.isNull(value.month) ? null : value.month; |
|
|
|
var month = BI.isNull(value.month) ? null : value.month; |
|
|
|
this.yearEditor.setValue(value.year); |
|
|
|
this.yearEditor.setValue(value.year); |
|
|
|
this.yearEditor.setTitle(value.year); |
|
|
|
|
|
|
|
this.monthEditor.setValue(month); |
|
|
|
this.monthEditor.setValue(month); |
|
|
|
this.monthEditor.setTitle(month); |
|
|
|
|
|
|
|
this.setTitle(this._getStaticTitle(value)); |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -109685,14 +109706,10 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year |
|
|
|
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate; |
|
|
|
return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate; |
|
|
|
}, |
|
|
|
}, |
|
|
|
_setTitle: function (v) { |
|
|
|
_setTitle: function (v) { |
|
|
|
this.left.setTitle(v); |
|
|
|
this.setTitle(v); |
|
|
|
this.right.setTitle(v); |
|
|
|
|
|
|
|
this.label.setTitle(v); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
_clearTitle: function () { |
|
|
|
_clearTitle: function () { |
|
|
|
this.left.setTitle(""); |
|
|
|
this.setTitle(""); |
|
|
|
this.right.setTitle(""); |
|
|
|
|
|
|
|
this.label.setTitle(""); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
setValue: function (date) { |
|
|
|
setValue: function (date) { |
|
|
|
date = date || {}; |
|
|
|
date = date || {}; |
|
|
|