|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
_consts:{ |
|
|
|
|
_consts: { |
|
|
|
|
iconWidth: 24 |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
@ -83,39 +83,45 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
ref: function () { |
|
|
|
|
self.popup = this; |
|
|
|
|
}, |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
self.setValue(self.popup.getValue()); |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
self.setValue(); |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
var date = BI.getDate(); |
|
|
|
|
self.setValue({ type: BI.DynamicYearMonthCombo.Static, value: { year: date.getFullYear(), quarter: BI.getQuarter(date) } }); |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
var value = self.popup.getValue(); |
|
|
|
|
if (self._checkValue(value)) { |
|
|
|
|
self.setValue(value); |
|
|
|
|
listeners: [ |
|
|
|
|
{ |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
self.setValue(self.popup.getValue()); |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
self.setValue(); |
|
|
|
|
self.comboWrapper.element.removeClass("error"); |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
var date = BI.getDate(); |
|
|
|
|
self.setValue({ |
|
|
|
|
type: BI.DynamicYearMonthCombo.Static, |
|
|
|
|
value: { year: date.getFullYear(), quarter: BI.getQuarter(date) } |
|
|
|
|
}); |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
var value = self.popup.getValue(); |
|
|
|
|
if (self._checkValue(value)) { |
|
|
|
|
self.setValue(value); |
|
|
|
|
} |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
|
} |
|
|
|
|
}], |
|
|
|
|
], |
|
|
|
|
behaviors: o.behaviors, |
|
|
|
|
min: o.minDate, |
|
|
|
|
max: o.maxDate |
|
|
|
@ -133,31 +139,35 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
element: this, |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
columnSize: ["", "fill"], |
|
|
|
|
cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow", |
|
|
|
|
ref: function () { |
|
|
|
|
self.comboWrapper = this; |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
columnSize: ["", "fill"], |
|
|
|
|
cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow", |
|
|
|
|
ref: function () { |
|
|
|
|
self.comboWrapper = this; |
|
|
|
|
}, |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: this._consts.iconWidth, |
|
|
|
|
height: BI.toPix(o.height, border), |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, this.combo |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: this._consts.iconWidth, |
|
|
|
|
height: BI.toPix(o.height, border), |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, this.combo] |
|
|
|
|
}, |
|
|
|
|
top: 0, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
top: 0, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
this._checkDynamicValue(o.value); |
|
|
|
|
}, |
|
|
|
|