diff --git a/app/assets/javascripts/discourse/models/category.js b/app/assets/javascripts/discourse/models/category.js index 2b3f14ca7..9087b1728 100644 --- a/app/assets/javascripts/discourse/models/category.js +++ b/app/assets/javascripts/discourse/models/category.js @@ -10,7 +10,11 @@ Discourse.Category = Discourse.Model.extend({ init: function() { this._super(); - if (!this.get('id') && this.get('name')) this.set('is_uncategorized', true); + if (!this.get('id') && this.get('name')) { + this.set('is_uncategorized', true); + if (!this.get('color')) this.set('color', Discourse.SiteSettings.uncategorized_color); + if (!this.get('text_color')) this.set('text_color', Discourse.SiteSettings.uncategorized_text_color); + } }, url: function() { diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb index a25b9c563..eb5442bb8 100755 --- a/app/models/site_setting.rb +++ b/app/models/site_setting.rb @@ -86,9 +86,9 @@ class SiteSetting < ActiveRecord::Base setting(:max_mentions_per_post, 10) setting(:newuser_max_mentions_per_post, 2) - setting(:uncategorized_name, 'uncategorized') - setting(:uncategorized_color, 'AB9364'); - setting(:uncategorized_text_color, 'FFFFFF'); + client_setting(:uncategorized_name, 'uncategorized') + client_setting(:uncategorized_color, 'AB9364'); + client_setting(:uncategorized_text_color, 'FFFFFF'); setting(:unique_posts_mins, Rails.env.test? ? 0 : 5)