mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
Use new colors constants
This commit is contained in:
parent
302ba75729
commit
ed6c6e5a25
3 changed files with 8 additions and 54 deletions
|
@ -4,7 +4,7 @@ import {
|
|||
TYPE_BOARD,
|
||||
TYPE_TEMPLATE_BOARD,
|
||||
TYPE_TEMPLATE_CONTAINER,
|
||||
} from '../config/const';
|
||||
} from '/config/const';
|
||||
|
||||
const escapeForRegex = require('escape-string-regexp');
|
||||
Boards = new Mongo.Collection('boards');
|
||||
|
@ -1324,7 +1324,7 @@ Boards.colorMap = () => {
|
|||
};
|
||||
|
||||
Boards.labelColors = () => {
|
||||
return _.clone(Boards.simpleSchema()._schema['labels.$.color'].allowedValues);
|
||||
return ALLOWED_COLORS;
|
||||
};
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ALLOWED_COLORS } from '/config/const';
|
||||
|
||||
Lists = new Mongo.Collection('lists');
|
||||
|
||||
/**
|
||||
|
@ -144,32 +146,7 @@ Lists.attachSchema(
|
|||
type: String,
|
||||
optional: true,
|
||||
// silver is the default, so it is left out
|
||||
allowedValues: [
|
||||
'white',
|
||||
'green',
|
||||
'yellow',
|
||||
'orange',
|
||||
'red',
|
||||
'purple',
|
||||
'blue',
|
||||
'sky',
|
||||
'lime',
|
||||
'pink',
|
||||
'black',
|
||||
'peachpuff',
|
||||
'crimson',
|
||||
'plum',
|
||||
'darkgreen',
|
||||
'slateblue',
|
||||
'magenta',
|
||||
'gold',
|
||||
'navy',
|
||||
'gray',
|
||||
'saddlebrown',
|
||||
'paleturquoise',
|
||||
'mistyrose',
|
||||
'indigo',
|
||||
],
|
||||
allowedValues: ALLOWED_COLORS,
|
||||
},
|
||||
type: {
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ALLOWED_COLORS } from '/config/const';
|
||||
|
||||
Swimlanes = new Mongo.Collection('swimlanes');
|
||||
|
||||
/**
|
||||
|
@ -68,32 +70,7 @@ Swimlanes.attachSchema(
|
|||
type: String,
|
||||
optional: true,
|
||||
// silver is the default, so it is left out
|
||||
allowedValues: [
|
||||
'white',
|
||||
'green',
|
||||
'yellow',
|
||||
'orange',
|
||||
'red',
|
||||
'purple',
|
||||
'blue',
|
||||
'sky',
|
||||
'lime',
|
||||
'pink',
|
||||
'black',
|
||||
'peachpuff',
|
||||
'crimson',
|
||||
'plum',
|
||||
'darkgreen',
|
||||
'slateblue',
|
||||
'magenta',
|
||||
'gold',
|
||||
'navy',
|
||||
'gray',
|
||||
'saddlebrown',
|
||||
'paleturquoise',
|
||||
'mistyrose',
|
||||
'indigo',
|
||||
],
|
||||
allowedValues: ALLOWED_COLORS,
|
||||
},
|
||||
updatedAt: {
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue