mirror of
https://github.com/wekan/wekan.git
synced 2026-02-13 11:44:20 +01:00
Card vote options in new fork
This commit is contained in:
parent
533bc045d0
commit
3cc0a93e0e
10 changed files with 239 additions and 65 deletions
|
|
@ -386,3 +386,30 @@ CardEndDate.register('cardEndDate');
|
|||
return this.date.get().format('l');
|
||||
}
|
||||
}.register('minicardEndDate'));
|
||||
|
||||
class VoteEndDate extends CardDate {
|
||||
onCreated() {
|
||||
super.onCreated();
|
||||
const self = this;
|
||||
self.autorun(() => {
|
||||
self.date.set(moment(self.data().getVoteEnd()));
|
||||
});
|
||||
}
|
||||
classes() {
|
||||
const classes = 'end-date' + ' ';
|
||||
return classes;
|
||||
}
|
||||
showDate() {
|
||||
return this.date.get().format('l LT');
|
||||
}
|
||||
showTitle() {
|
||||
return `${TAPi18n.__('card-end-on')} ${this.date.get().format('LLLL')}`;
|
||||
}
|
||||
|
||||
events() {
|
||||
return super.events().concat({
|
||||
'click .js-edit-date': Popup.open('editVoteEndDate'),
|
||||
});
|
||||
}
|
||||
}
|
||||
VoteEndDate.register('voteEndDate');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue