Show custom colours in colour picker too
This commit is contained in:
parent
1ce7a40084
commit
78d9b44106
|
@ -26,7 +26,8 @@ Discourse.EditCategoryView = Discourse.ModalBodyView.extend({
|
||||||
|
|
||||||
// background colors are available as a pipe-separated string
|
// background colors are available as a pipe-separated string
|
||||||
backgroundColors: function() {
|
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'),
|
}.property('Discourse.SiteSettings.category_colors'),
|
||||||
|
|
||||||
usedBackgroundColors: function() {
|
usedBackgroundColors: function() {
|
||||||
|
|
|
@ -15,9 +15,10 @@
|
||||||
|
|
||||||
.colors-container {
|
.colors-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: bottom;
|
vertical-align: middle;
|
||||||
padding-bottom: 2px;
|
padding-top: 4px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
|
max-width: 320px;
|
||||||
|
|
||||||
.colorpicker {
|
.colorpicker {
|
||||||
border: 1px solid $darkish_gray;
|
border: 1px solid $darkish_gray;
|
||||||
|
|
Loading…
Reference in New Issue