Fix JsHint
This commit is contained in:
parent
1dae46021e
commit
56764f817b
|
@ -62,9 +62,10 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
return this.get('username').toLowerCase();
|
||||
}).property('username'),
|
||||
|
||||
trustLevel: (function() {
|
||||
return Discourse.get('site.trust_levels').findProperty('id', this.get('trust_level'));
|
||||
}).property('trust_level'),
|
||||
trustLevel: function() {
|
||||
var site = Discourse.Site.instance();
|
||||
return site.get('trust_levels').findProperty('id', this.get('trust_level'));
|
||||
}.property('trust_level'),
|
||||
|
||||
isBanned: (function() {
|
||||
return this.get('is_banned') === true;
|
||||
|
|
|
@ -38,7 +38,7 @@ Discourse.Site = Discourse.Model.extend({
|
|||
|
||||
Discourse.Site.reopenClass({
|
||||
|
||||
find: function() {
|
||||
instance: function() {
|
||||
return Discourse.Site.create(PreloadStore.get('site'));
|
||||
},
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
**/
|
||||
Discourse.ApplicationRoute = Discourse.Route.extend({
|
||||
setupController: function(controller) {
|
||||
Discourse.set('site', Discourse.Site.find());
|
||||
Discourse.set('site', Discourse.Site.instance());
|
||||
|
||||
var currentUser = PreloadStore.get('currentUser');
|
||||
if (currentUser) {
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
Discourse.ListCategoryRoute = Discourse.FilteredListRoute.extend({
|
||||
|
||||
model: function(params) {
|
||||
var categories = Discourse.Site.find().get('categories');
|
||||
var categories = Discourse.Site.instance().get('categories');
|
||||
|
||||
var slug = Em.get(params, 'slug');
|
||||
|
||||
category = categories.findProperty('slug', Em.get(params, 'slug'))
|
||||
var category = categories.findProperty('slug', Em.get(params, 'slug'))
|
||||
|
||||
// In case the slug didn't work, try to find it by id instead.
|
||||
if (!category) {
|
||||
|
|
Loading…
Reference in New Issue