mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
41 lines
994 B
JavaScript
41 lines
994 B
JavaScript
|
|
Template.cardCustomFieldsPopup.events({
|
||
|
|
'click .js-select-field'(evt) {
|
||
|
|
const card = Cards.findOne(Session.get('currentCard'));
|
||
|
|
const customFieldId = this._id;
|
||
|
|
card.toggleCustomField(customFieldId);
|
||
|
|
evt.preventDefault();
|
||
|
|
},
|
||
|
|
'click .js-configure-custom-fields'(evt) {
|
||
|
|
EscapeActions.executeUpTo('detailsPane');
|
||
|
|
Sidebar.setView('customFields');
|
||
|
|
evt.preventDefault();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
const CardCustomField = BlazeComponent.extendComponent({
|
||
|
|
template() {
|
||
|
|
return 'cardCustomFieldText';
|
||
|
|
},
|
||
|
|
|
||
|
|
onCreated() {
|
||
|
|
const self = this;
|
||
|
|
self.date = ReactiveVar();
|
||
|
|
self.now = ReactiveVar(moment());
|
||
|
|
},
|
||
|
|
|
||
|
|
value() {
|
||
|
|
return "this is the value";
|
||
|
|
},
|
||
|
|
|
||
|
|
showISODate() {
|
||
|
|
return this.date.get().toISOString();
|
||
|
|
},
|
||
|
|
|
||
|
|
events() {
|
||
|
|
return [{
|
||
|
|
'click .js-edit-date': Popup.open('editCardStartDate'),
|
||
|
|
}];
|
||
|
|
},
|
||
|
|
});
|
||
|
|
|
||
|
|
CardCustomField.register('cardCustomField');
|