Show custom colours in colour picker too

This commit is contained in:
Neil Lalonde 2013-04-09 12:52:06 -04:00
parent 1ce7a40084
commit 78d9b44106
2 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,8 @@ Discourse.EditCategoryView = Discourse.ModalBodyView.extend({
// background colors are available as a pipe-separated string
backgroundColors: function() {
return Discourse.SiteSettings.category_colors.split("|").map(function(i) { return i.toUpperCase(); });
return Discourse.SiteSettings.category_colors.split("|").map(function(i) { return i.toUpperCase(); }).concat(
Discourse.site.categories.map(function(c) { return c.color.toUpperCase(); }) ).uniq();
}.property('Discourse.SiteSettings.category_colors'),
usedBackgroundColors: function() {

View File

@ -15,9 +15,10 @@
.colors-container {
display: inline-block;
vertical-align: bottom;
padding-bottom: 2px;
vertical-align: middle;
padding-top: 4px;
padding-left: 15px;
max-width: 320px;
.colorpicker {
border: 1px solid $darkish_gray;