From afd87e3caa1fedbe8fe5dbaefa485fee1ed85c71 Mon Sep 17 00:00:00 2001 From: Pouyan Savoli Date: Sun, 27 Aug 2017 22:31:24 +0200 Subject: many custom fields model and UI enhancements --- client/components/cards/cardDetails.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'client/components/cards/cardDetails.js') diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 7c6c3ce7..f972424f 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -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 -- cgit v1.2.3-1-g7c22