missing bits from user page rediscovered
This commit is contained in:
@@ -25,7 +25,7 @@ Discourse.User = Discourse.Model.extend({
|
||||
@type {String}
|
||||
**/
|
||||
avatarSmall: (function() {
|
||||
return Discourse.Utilities.avatarUrl(this.get('username'), 'small', this.get('avatar_template'));
|
||||
return Discourse.Utilities.avatarUrl(this.get('username'), 'small', this.get('avatar_template'));
|
||||
}).property('username'),
|
||||
|
||||
/**
|
||||
@@ -34,9 +34,13 @@ Discourse.User = Discourse.Model.extend({
|
||||
@property websiteName
|
||||
@type {String}
|
||||
**/
|
||||
websiteName: (function() {
|
||||
websiteName: function() {
|
||||
return this.get('website').split("/")[2];
|
||||
}).property('website'),
|
||||
}.property('website'),
|
||||
|
||||
hasWebsite: function() {
|
||||
return this.present('website');
|
||||
}.property('website'),
|
||||
|
||||
/**
|
||||
Path to this user.
|
||||
@@ -334,6 +338,7 @@ Discourse.User = Discourse.Model.extend({
|
||||
|
||||
onDetailsLoaded: function(callback){
|
||||
var _this = this;
|
||||
this.set("loading",false);
|
||||
|
||||
if(callback){
|
||||
this.onDetailsLoadedCallbacks = this.onDetailsLoadedCallbacks || [];
|
||||
@@ -353,6 +358,7 @@ Discourse.User = Discourse.Model.extend({
|
||||
**/
|
||||
loadDetails: function() {
|
||||
|
||||
this.set("loading",true);
|
||||
// Check the preload store first
|
||||
var user = this;
|
||||
var username = this.get('username');
|
||||
|
||||
Reference in New Issue
Block a user