summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-06-05 20:23:29 +0000
committerRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-06-05 20:23:29 +0000
commit3ce3fa74b350ff1af73b0fffddaeff4b0f126e2c (patch)
tree78d501d18a4302578b84683b47e8933b8df4f72b /client/components/cards/cardDetails.js
parentd6eff2a07453cad87623955905ddb6ce247aa719 (diff)
downloadwekan-3ce3fa74b350ff1af73b0fffddaeff4b0f126e2c.tar.gz
wekan-3ce3fa74b350ff1af73b0fffddaeff4b0f126e2c.tar.bz2
wekan-3ce3fa74b350ff1af73b0fffddaeff4b0f126e2c.zip
Add additional label colours (from pull by JamesLavin), Add Assigned & Requested By text fields.
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js42
1 files changed, 41 insertions, 1 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 26549fda..8aec8a59 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -146,6 +146,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 (requestor) {
+ this.data().setRequestedBy(requester);
+ }
+ },
'click .js-member': Popup.open('cardMember'),
'click .js-add-members': Popup.open('cardMembers'),
'click .js-add-labels': Popup.open('cardLabels'),
@@ -215,8 +229,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'),
@@ -263,6 +277,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