|
|
@ -18,6 +18,8 @@ BI.MonthPopup = BI.inherit(BI.Widget, { |
|
|
|
BI.MonthPopup.superclass._init.apply(this, arguments); |
|
|
|
BI.MonthPopup.superclass._init.apply(this, arguments); |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selectedMonth = BI.getDate().getMonth() + 1; |
|
|
|
|
|
|
|
|
|
|
|
this.month = BI.createWidget({ |
|
|
|
this.month = BI.createWidget({ |
|
|
|
type: "bi.button_group", |
|
|
|
type: "bi.button_group", |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
@ -39,6 +41,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.month.on(BI.Controller.EVENT_CHANGE, function (type) { |
|
|
|
this.month.on(BI.Controller.EVENT_CHANGE, function (type) { |
|
|
|
|
|
|
|
self.selectedMonth = this.getValue()[0]; |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
self.fireEvent(BI.MonthPopup.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.MonthPopup.EVENT_CHANGE); |
|
|
@ -82,11 +85,12 @@ BI.MonthPopup = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue: function () { |
|
|
|
return this.month.getValue()[0]; |
|
|
|
return this.selectedMonth; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
v = BI.parseInt(v); |
|
|
|
v = BI.parseInt(v); |
|
|
|
|
|
|
|
this.selectedMonth = v; |
|
|
|
this.month.setValue([v]); |
|
|
|
this.month.setValue([v]); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|