mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 21:28:49 +01:00
show custom fields on cards but still with dummy value
This commit is contained in:
parent
733b14dcd8
commit
6ff89b43b6
5 changed files with 89 additions and 30 deletions
41
client/components/cards/cardCustomFields.js
Normal file
41
client/components/cards/cardCustomFields.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
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');
|
||||
Loading…
Add table
Add a link
Reference in a new issue