diff options
author | Pouyan Savoli <papoola@hotmail.com> | 2017-09-14 00:50:05 +0200 |
---|---|---|
committer | Pouyan Savoli <papoola@hotmail.com> | 2017-09-22 22:59:32 +0200 |
commit | caad952bc1b29bb925c1347a14daa5d1ec8ada81 (patch) | |
tree | 73b88d891f3204485d4aa3ea996ea2dba620a8ce /models | |
parent | 6ff89b43b61ace7ea26d50f091ea6b714fa79c84 (diff) | |
download | wekan-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.js | 12 |
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}}; }, |