mirror of
https://github.com/wekan/wekan.git
synced 2025-12-21 09:50:13 +01:00
- Translate and add colors to IFTTT Rules dropdown.
Thanks to xet7 !
This commit is contained in:
parent
d8482b533a
commit
44e4df2492
3 changed files with 19 additions and 18 deletions
|
|
@ -3,7 +3,7 @@ const { calculateIndexData, enableClickOnTouch } = Utils;
|
||||||
|
|
||||||
let cardColors;
|
let cardColors;
|
||||||
Meteor.startup(() => {
|
Meteor.startup(() => {
|
||||||
cardColors = Cards.simpleSchema()._schema['color'].allowedValues;
|
cardColors = Cards.simpleSchema()._schema.color.allowedValues;
|
||||||
});
|
});
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ template(name="cardTriggers")
|
||||||
div.trigger-dropdown
|
div.trigger-dropdown
|
||||||
select(id="spec-label")
|
select(id="spec-label")
|
||||||
each labels
|
each labels
|
||||||
option(value="#{_id}")
|
option(value="#{_id}" style="background-color: #{name}")
|
||||||
= name
|
= translatedname
|
||||||
div.trigger-text
|
div.trigger-text
|
||||||
| {{_'r-is'}}
|
| {{_'r-is'}}
|
||||||
div.trigger-dropdown
|
div.trigger-dropdown
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@ BlazeComponent.extendComponent({
|
||||||
const labels = Boards.findOne(Session.get('currentBoard')).labels;
|
const labels = Boards.findOne(Session.get('currentBoard')).labels;
|
||||||
for (let i = 0; i < labels.length; i++) {
|
for (let i = 0; i < labels.length; i++) {
|
||||||
if (labels[i].name === '' || labels[i].name === undefined) {
|
if (labels[i].name === '' || labels[i].name === undefined) {
|
||||||
labels[i].name = labels[i].color.toUpperCase();
|
labels[i].name = labels[i].color;
|
||||||
|
labels[i].translatedname = `${TAPi18n.__(`color-${ labels[i].color}`)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return labels;
|
return labels;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue