summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorPouyan Savoli <papoola@hotmail.com>2017-09-14 00:50:05 +0200
committerPouyan Savoli <papoola@hotmail.com>2017-09-22 22:59:32 +0200
commitcaad952bc1b29bb925c1347a14daa5d1ec8ada81 (patch)
tree73b88d891f3204485d4aa3ea996ea2dba620a8ce /models
parent6ff89b43b61ace7ea26d50f091ea6b714fa79c84 (diff)
downloadwekan-caad952bc1b29bb925c1347a14daa5d1ec8ada81.tar.gz
wekan-caad952bc1b29bb925c1347a14daa5d1ec8ada81.tar.bz2
wekan-caad952bc1b29bb925c1347a14daa5d1ec8ada81.zip
text custom fields are now editable using inlinedForm
Diffstat (limited to 'models')
-rw-r--r--models/cards.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/models/cards.js b/models/cards.js
index fe86e642..17abf430 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -279,12 +279,10 @@ Cards.mutations({
},
assignCustomField(customFieldId) {
- console.log("assignCustomField", customFieldId);
return {$addToSet: {customFields: {_id: customFieldId, value: null}}};
},
unassignCustomField(customFieldId) {
- console.log("unassignCustomField", customFieldId);
return {$pull: {customFields: {_id: customFieldId}}};
},
@@ -296,6 +294,16 @@ Cards.mutations({
}
},
+ setCustomField(customFieldId, value) {
+ // todo
+ const index = this.customFieldIndex(customFieldId);
+ if (index > -1) {
+ var update = {$set: {}};
+ update.$set["customFields." + index + ".value"] = value;
+ return update;
+ }
+ },
+
setCover(coverId) {
return {$set: {coverId}};
},