|
|
|
@ -109309,6 +109309,12 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
height: 24 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
beforeInit: function (callback) { |
|
|
|
|
var o = this.options; |
|
|
|
|
o.title = BI.bind(this._titleCreator, this); |
|
|
|
|
callback(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments); |
|
|
|
|
var o = this.options; |
|
|
|
@ -109416,6 +109422,27 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
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) { |
|
|
|
|
var value = editor.getValue(); |
|
|
|
|
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 |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
this.setTitle(this._getStaticTitle(this.storeValue.value)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_yearCheck: function (v) { |
|
|
|
@ -109460,10 +109486,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setInnerValue: function (date, text) { |
|
|
|
|
var dateStr = date.print("%Y-%x"); |
|
|
|
|
this.yearEditor.setValue(date.getFullYear()); |
|
|
|
|
this.monthEditor.setValue(date.getMonth() + 1); |
|
|
|
|
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getStaticTitle: function (value) { |
|
|
|
@ -109492,10 +109516,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
value = value || {}; |
|
|
|
|
var month = BI.isNull(value.month) ? null : value.month; |
|
|
|
|
this.yearEditor.setValue(value.year); |
|
|
|
|
this.yearEditor.setTitle(value.year); |
|
|
|
|
this.monthEditor.setValue(month); |
|
|
|
|
this.monthEditor.setTitle(month); |
|
|
|
|
this.setTitle(this._getStaticTitle(value)); |
|
|
|
|
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; |
|
|
|
|
}, |
|
|
|
|
_setTitle: function (v) { |
|
|
|
|
this.left.setTitle(v); |
|
|
|
|
this.right.setTitle(v); |
|
|
|
|
this.label.setTitle(v); |
|
|
|
|
this.setTitle(v); |
|
|
|
|
}, |
|
|
|
|
_clearTitle: function () { |
|
|
|
|
this.left.setTitle(""); |
|
|
|
|
this.right.setTitle(""); |
|
|
|
|
this.label.setTitle(""); |
|
|
|
|
this.setTitle(""); |
|
|
|
|
}, |
|
|
|
|
setValue: function (date) { |
|
|
|
|
date = date || {}; |
|
|
|
|