mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01: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_BOARD,
|
||||||
TYPE_TEMPLATE_BOARD,
|
TYPE_TEMPLATE_BOARD,
|
||||||
TYPE_TEMPLATE_CONTAINER,
|
TYPE_TEMPLATE_CONTAINER,
|
||||||
} from '../config/const';
|
} from '/config/const';
|
||||||
|
|
||||||
const escapeForRegex = require('escape-string-regexp');
|
const escapeForRegex = require('escape-string-regexp');
|
||||||
Boards = new Mongo.Collection('boards');
|
Boards = new Mongo.Collection('boards');
|
||||||
|
|
@ -1324,7 +1324,7 @@ Boards.colorMap = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
Boards.labelColors = () => {
|
Boards.labelColors = () => {
|
||||||
return _.clone(Boards.simpleSchema()._schema['labels.$.color'].allowedValues);
|
return ALLOWED_COLORS;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Meteor.isServer) {
|
if (Meteor.isServer) {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { ALLOWED_COLORS } from '/config/const';
|
||||||
|
|
||||||
Lists = new Mongo.Collection('lists');
|
Lists = new Mongo.Collection('lists');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -144,32 +146,7 @@ Lists.attachSchema(
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
// silver is the default, so it is left out
|
// silver is the default, so it is left out
|
||||||
allowedValues: [
|
allowedValues: ALLOWED_COLORS,
|
||||||
'white',
|
|
||||||
'green',
|
|
||||||
'yellow',
|
|
||||||
'orange',
|
|
||||||
'red',
|
|
||||||
'purple',
|
|
||||||
'blue',
|
|
||||||
'sky',
|
|
||||||
'lime',
|
|
||||||
'pink',
|
|
||||||
'black',
|
|
||||||
'peachpuff',
|
|
||||||
'crimson',
|
|
||||||
'plum',
|
|
||||||
'darkgreen',
|
|
||||||
'slateblue',
|
|
||||||
'magenta',
|
|
||||||
'gold',
|
|
||||||
'navy',
|
|
||||||
'gray',
|
|
||||||
'saddlebrown',
|
|
||||||
'paleturquoise',
|
|
||||||
'mistyrose',
|
|
||||||
'indigo',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { ALLOWED_COLORS } from '/config/const';
|
||||||
|
|
||||||
Swimlanes = new Mongo.Collection('swimlanes');
|
Swimlanes = new Mongo.Collection('swimlanes');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -68,32 +70,7 @@ Swimlanes.attachSchema(
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
// silver is the default, so it is left out
|
// silver is the default, so it is left out
|
||||||
allowedValues: [
|
allowedValues: ALLOWED_COLORS,
|
||||||
'white',
|
|
||||||
'green',
|
|
||||||
'yellow',
|
|
||||||
'orange',
|
|
||||||
'red',
|
|
||||||
'purple',
|
|
||||||
'blue',
|
|
||||||
'sky',
|
|
||||||
'lime',
|
|
||||||
'pink',
|
|
||||||
'black',
|
|
||||||
'peachpuff',
|
|
||||||
'crimson',
|
|
||||||
'plum',
|
|
||||||
'darkgreen',
|
|
||||||
'slateblue',
|
|
||||||
'magenta',
|
|
||||||
'gold',
|
|
||||||
'navy',
|
|
||||||
'gray',
|
|
||||||
'saddlebrown',
|
|
||||||
'paleturquoise',
|
|
||||||
'mistyrose',
|
|
||||||
'indigo',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
updatedAt: {
|
updatedAt: {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue