diff options
author | IgnatzHome <ignatz@maschath.de> | 2018-06-14 19:42:09 +0200 |
---|---|---|
committer | IgnatzHome <ignatz@maschath.de> | 2018-06-14 19:42:09 +0200 |
commit | a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e (patch) | |
tree | 6e30c7ebc0106518ec5ea76bcb57d294cc9f48f1 /client/components/cards/cardDetails.js | |
parent | 991e74bfc287d840951b7c707b7ff2a2f26e5001 (diff) | |
parent | fcf262cc9807c1e87e638ce6b0c6151ae2114f60 (diff) | |
download | wekan-a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e.tar.gz wekan-a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e.tar.bz2 wekan-a433f7d9fe310e1aa5f5c831b2bfacb5b86c941e.zip |
Merge branch 'feature-custom-fields' of https://github.com/feuerball11/wekan into feature-custom-fields
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r-- | client/components/cards/cardDetails.js | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index a2bf2d02..1a8a8bef 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -150,6 +150,20 @@ BlazeComponent.extendComponent({ this.data().setTitle(title); } }, + 'submit .js-card-details-assigner'(evt) { + evt.preventDefault(); + const assigner = this.currentComponent().getValue().trim(); + if (assigner) { + this.data().setAssignedBy(assigner); + } + }, + 'submit .js-card-details-requester'(evt) { + evt.preventDefault(); + const requester = this.currentComponent().getValue().trim(); + if (requester) { + this.data().setRequestedBy(requester); + } + }, 'click .js-member': Popup.open('cardMember'), 'click .js-add-members': Popup.open('cardMembers'), 'click .js-add-labels': Popup.open('cardLabels'), @@ -221,8 +235,8 @@ Template.cardDetailsActionsPopup.events({ 'click .js-members': Popup.open('cardMembers'), 'click .js-labels': Popup.open('cardLabels'), 'click .js-attachments': Popup.open('cardAttachments'), - 'click .js-received-date': Popup.open('editCardReceivedDate'), 'click .js-custom-fields': Popup.open('cardCustomFields'), + 'click .js-received-date': Popup.open('editCardReceivedDate'), 'click .js-start-date': Popup.open('editCardStartDate'), 'click .js-due-date': Popup.open('editCardDueDate'), 'click .js-end-date': Popup.open('editCardEndDate'), @@ -269,6 +283,32 @@ Template.editCardTitleForm.events({ }, }); +Template.editCardRequesterForm.onRendered(function() { + autosize(this.$('.js-edit-card-requester')); +}); + +Template.editCardRequesterForm.events({ + 'keydown .js-edit-card-requester'(evt) { + // If enter key was pressed, submit the data + if (evt.keyCode === 13) { + $('.js-submit-edit-card-requester-form').click(); + } + }, +}); + +Template.editCardAssignerForm.onRendered(function() { + autosize(this.$('.js-edit-card-assigner')); +}); + +Template.editCardAssignerForm.events({ + 'keydown .js-edit-card-assigner'(evt) { + // If enter key was pressed, submit the data + if (evt.keyCode === 13) { + $('.js-submit-edit-card-assigner-form').click(); + } + }, +}); + Template.moveCardPopup.events({ 'click .js-done' () { // XXX We should *not* get the currentCard from the global state, but |