mirror of
https://github.com/wekan/wekan.git
synced 2026-01-24 02:06:10 +01:00
many custom fields model and UI enhancements
This commit is contained in:
parent
ade3c02122
commit
afd87e3caa
13 changed files with 153 additions and 63 deletions
|
|
@ -107,6 +107,7 @@ template(name="cardDetailsActionsPopup")
|
|||
li: a.js-members {{_ 'card-edit-members'}}
|
||||
li: a.js-labels {{_ 'card-edit-labels'}}
|
||||
li: a.js-attachments {{_ 'card-edit-attachments'}}
|
||||
li: a.js-custom-fields {{_ 'card-edit-custom-fields'}}
|
||||
li: a.js-start-date {{_ 'editCardStartDatePopup-title'}}
|
||||
li: a.js-due-date {{_ 'editCardDueDatePopup-title'}}
|
||||
hr
|
||||
|
|
@ -143,6 +144,20 @@ template(name="cardMembersPopup")
|
|||
if isCardMember
|
||||
i.fa.fa-check
|
||||
|
||||
template(name="cardCustomFieldsPopup")
|
||||
ul.pop-over-list
|
||||
each board.customFields
|
||||
li.item(class="")
|
||||
a.name.js-select-field(href="#")
|
||||
span.full-name
|
||||
= name
|
||||
if isCardMember
|
||||
i.fa.fa-check
|
||||
hr
|
||||
a.quiet-button.full.js-configure-custom-fields
|
||||
i.fa.fa-cog
|
||||
span {{_ 'configure-custom-fields'}}
|
||||
|
||||
template(name="cardMorePopup")
|
||||
p.quiet
|
||||
span.clearfix
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ Template.cardDetailsActionsPopup.events({
|
|||
'click .js-members': Popup.open('cardMembers'),
|
||||
'click .js-labels': Popup.open('cardLabels'),
|
||||
'click .js-attachments': Popup.open('cardAttachments'),
|
||||
'click .js-custom-fields': Popup.open('cardCustomFields'),
|
||||
'click .js-start-date': Popup.open('editCardStartDate'),
|
||||
'click .js-due-date': Popup.open('editCardDueDate'),
|
||||
'click .js-move-card': Popup.open('moveCard'),
|
||||
|
|
@ -196,6 +197,20 @@ Template.editCardTitleForm.events({
|
|||
},
|
||||
});
|
||||
|
||||
Template.cardCustomFieldsPopup.events({
|
||||
'click .js-select-field'(evt) {
|
||||
const card = Cards.findOne(Session.get('currentCard'));
|
||||
const customFieldId = this.customFieldId;
|
||||
card.toggleCustomField(customFieldId);
|
||||
evt.preventDefault();
|
||||
},
|
||||
'click .js-configure-custom-fields'(evt) {
|
||||
EscapeActions.executeUpTo('detailsPane');
|
||||
Sidebar.setView('customFields');
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
Template.moveCardPopup.events({
|
||||
'click .js-select-list' () {
|
||||
// XXX We should *not* get the currentCard from the global state, but
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue