|
|
@ -363,6 +363,18 @@ define([
|
|
|
|
var palette = [''];
|
|
|
|
var palette = [''];
|
|
|
|
for (var i=1; i<=8; i++) { palette.push('color'+i); }
|
|
|
|
for (var i=1; i<=8; i++) { palette.push('color'+i); }
|
|
|
|
var selectedColor = '';
|
|
|
|
var selectedColor = '';
|
|
|
|
|
|
|
|
var resetThemeClass = function () {
|
|
|
|
|
|
|
|
$colors.find('.cp-kanban-palette').each(function (i, el) {
|
|
|
|
|
|
|
|
var $c = $(el);
|
|
|
|
|
|
|
|
$c.removeClass('cp-kanban-palette-card');
|
|
|
|
|
|
|
|
$c.removeClass('cp-kanban-palette-board');
|
|
|
|
|
|
|
|
if (isBoard) {
|
|
|
|
|
|
|
|
$c.addClass('cp-kanban-palette-board');
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$c.addClass('cp-kanban-palette-card');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
palette.forEach(function (color) {
|
|
|
|
palette.forEach(function (color) {
|
|
|
|
var $color = $(h('span.cp-kanban-palette.fa'));
|
|
|
|
var $color = $(h('span.cp-kanban-palette.fa'));
|
|
|
|
$color.addClass('cp-kanban-palette-'+(color || 'nocolor'));
|
|
|
|
$color.addClass('cp-kanban-palette-'+(color || 'nocolor'));
|
|
|
@ -383,6 +395,7 @@ define([
|
|
|
|
return selectedColor;
|
|
|
|
return selectedColor;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setValue: function (color) {
|
|
|
|
setValue: function (color) {
|
|
|
|
|
|
|
|
resetThemeClass();
|
|
|
|
$colors.find('.cp-kanban-palette').removeClass('fa-check');
|
|
|
|
$colors.find('.cp-kanban-palette').removeClass('fa-check');
|
|
|
|
var $col = $colors.find('.cp-kanban-palette-'+(color || 'nocolor'));
|
|
|
|
var $col = $colors.find('.cp-kanban-palette-'+(color || 'nocolor'));
|
|
|
|
$col.addClass('fa-check');
|
|
|
|
$col.addClass('fa-check');
|
|
|
|