Minor fixes. Link directoy to user activity to avoid a redirect.

This commit is contained in:
Robin Ward 2013-07-26 15:56:29 -04:00
parent e77ee1eaa8
commit 5d66f6ed8e
4 changed files with 5 additions and 7 deletions

View File

@ -13,9 +13,6 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
// Whether the app has focus or not
hasFocus: true,
// Are we currently scrolling?
scrolling: false,
// Helps with integration tests
URL_FIXTURES: {},

View File

@ -249,6 +249,7 @@ Discourse.User = Discourse.Model.extend({
findDetails: function() {
var user = this;
return PreloadStore.getAndRemove("user_" + user.get('username'), function() {
return Discourse.ajax("/users/" + user.get('username') + '.json');
}).then(function (json) {

View File

@ -17,7 +17,7 @@ Discourse.UserStream = Discourse.Model.extend({
}.observes('filter'),
findItems: function() {
var me = this;
var userStream = this;
if(this.get("loading")) { return Ember.RSVP.reject(); }
this.set("loading",true);
@ -28,7 +28,7 @@ Discourse.UserStream = Discourse.Model.extend({
var stream = this;
return Discourse.ajax(url, {cache: 'false'}).then( function(result) {
me.set("loading",false);
userStream.set("loading",false);
if (result && result.user_actions) {
var copy = Em.A();
_.each(result.user_actions,function(action) {
@ -38,7 +38,7 @@ Discourse.UserStream = Discourse.Model.extend({
stream.get('content').pushObjects(copy);
stream.set('itemsLoaded', stream.get('itemsLoaded') + result.user_actions.length);
}
}, function(){ me.set("loading", false); });
}, function(){ userStream.set("loading", false); });
}
});

View File

@ -85,7 +85,7 @@
</li>
<li class='current-user'>
{{#if currentUser}}
{{#titledLinkTo 'user' currentUser titleKey="current_user" class="icon"}}{{avatar currentUser imageSize="medium" }}{{/titledLinkTo}}
{{#linkTo 'userActivity.index' currentUser titleKey="current_user" class="icon"}}{{avatar currentUser imageSize="medium" }}{{/linkTo}}
{{else}}
<div class="icon not-logged-in-avatar" {{action showLogin}}><i class='icon-user'></i></div>
{{/if}}