Fix edit uncategorized when on the /category/uncategorized page
This commit is contained in:
parent
b0945599b7
commit
b944157d88
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue