|
|
|
@ -28,7 +28,7 @@ const checkDate = (date: Date) => {
@@ -28,7 +28,7 @@ const checkDate = (date: Date) => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default class PopupSchedule extends PopupDatePicker { |
|
|
|
|
constructor(initDate: Date, onPick: (timestamp: number) => void) { |
|
|
|
|
constructor(initDate: Date, onPick: (timestamp: number) => void, canSendWhenOnline: boolean) { |
|
|
|
|
super(checkDate(initDate), onPick, { |
|
|
|
|
noButtons: true, |
|
|
|
|
noTitle: true, |
|
|
|
@ -43,9 +43,11 @@ export default class PopupSchedule extends PopupDatePicker {
@@ -43,9 +43,11 @@ export default class PopupSchedule extends PopupDatePicker {
|
|
|
|
|
this.element.classList.add('popup-schedule'); |
|
|
|
|
this.header.append(this.controlsDiv); |
|
|
|
|
this.title.replaceWith(this.monthTitle); |
|
|
|
|
this.body.append(this.btnConfirm); |
|
|
|
|
|
|
|
|
|
if(canSendWhenOnline) { |
|
|
|
|
const btnSendWhenOnline = Button('btn-primary btn-secondary btn-primary-transparent primary', {text: 'Schedule.SendWhenOnline'}); |
|
|
|
|
this.body.append(this.btnConfirm, btnSendWhenOnline); |
|
|
|
|
this.body.append(btnSendWhenOnline); |
|
|
|
|
|
|
|
|
|
attachClickEvent(btnSendWhenOnline, () => { |
|
|
|
|
onPick(SEND_WHEN_ONLINE_TIMESTAMP); |
|
|
|
@ -53,3 +55,4 @@ export default class PopupSchedule extends PopupDatePicker {
@@ -53,3 +55,4 @@ export default class PopupSchedule extends PopupDatePicker {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|