summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorPouyan Savoli <papoola@hotmail.com>2017-08-30 02:54:54 +0200
committerPouyan Savoli <papoola@hotmail.com>2017-09-22 22:59:32 +0200
commitd87191f17ee1cd49def9ca5a4d3d1568b041e6a2 (patch)
treef5cb0645508dcb23aa2c50d0e93d18f39eb41a08 /client
parentafd87e3caa1fedbe8fe5dbaefa485fee1ed85c71 (diff)
downloadwekan-d87191f17ee1cd49def9ca5a4d3d1568b041e6a2.tar.gz
wekan-d87191f17ee1cd49def9ca5a4d3d1568b041e6a2.tar.bz2
wekan-d87191f17ee1cd49def9ca5a4d3d1568b041e6a2.zip
card model and card ui preparation for custom fields
Diffstat (limited to 'client')
-rw-r--r--client/components/cards/cardDetails.jade3
-rw-r--r--client/components/cards/cardDetails.js2
-rw-r--r--client/components/cards/cardDetails.styl5
-rw-r--r--client/components/lists/listBody.js7
4 files changed, 14 insertions, 3 deletions
diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade
index ccb3ae97..7cb4f8d8 100644
--- a/client/components/cards/cardDetails.jade
+++ b/client/components/cards/cardDetails.jade
@@ -45,6 +45,9 @@ template(name="cardDetails")
h3.card-details-item-title {{_ 'card-due'}}
+cardDueDate
+ each customFields
+ .card-details-item.card-details-item-customfield
+ h3.card-details-item-title {{_ 'some-title' }}
//- XXX We should use "editable" to avoid repetiting ourselves
if canModifyCard
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index f972424f..1cc39492 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -200,7 +200,7 @@ Template.editCardTitleForm.events({
Template.cardCustomFieldsPopup.events({
'click .js-select-field'(evt) {
const card = Cards.findOne(Session.get('currentCard'));
- const customFieldId = this.customFieldId;
+ const customFieldId = this._id;
card.toggleCustomField(customFieldId);
evt.preventDefault();
},
diff --git a/client/components/cards/cardDetails.styl b/client/components/cards/cardDetails.styl
index f209862c..5ad0c9f5 100644
--- a/client/components/cards/cardDetails.styl
+++ b/client/components/cards/cardDetails.styl
@@ -70,6 +70,7 @@
.card-details-items
display: flex
+ flex-wrap: wrap
margin: 15px 0
.card-details-item
@@ -80,8 +81,8 @@
&.card-details-item-members,
&.card-details-item-start,
&.card-details-item-due
- width: 50%
- flex-shrink: 1
+ max-width: 50%
+ flex-grow: 1
.card-details-item-title
font-size: 14px
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 724e805b..edac5b03 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -35,12 +35,17 @@ BlazeComponent.extendComponent({
const members = formComponent.members.get();
const labelIds = formComponent.labels.get();
+ const customFields = formComponent.customFields.get();
+ console.log("members", members);
+ console.log("labelIds", labelIds);
+ console.log("customFields", customFields);
if (title) {
const _id = Cards.insert({
title,
members,
labelIds,
+ customFields,
listId: this.data()._id,
boardId: this.data().board()._id,
sort: sortIndex,
@@ -121,11 +126,13 @@ BlazeComponent.extendComponent({
onCreated() {
this.labels = new ReactiveVar([]);
this.members = new ReactiveVar([]);
+ this.customFields = new ReactiveVar([]);
},
reset() {
this.labels.set([]);
this.members.set([]);
+ this.customFields.set([]);
},
getLabels() {