Renamed `poster-expansion` to `user-expansion` because it's not specific

to a poster anymore.
This commit is contained in:
Robin Ward 2014-09-02 11:59:44 -04:00
parent 2b0e11dad8
commit ce745b737e
9 changed files with 10 additions and 10 deletions

View File

@ -13,7 +13,7 @@ var ApplicationRoute = Em.Route.extend({
},
expandUser: function(user) {
this.controllerFor('poster-expansion').show(user.get('username'), user.get('uploaded_avatar_id'));
this.controllerFor('user-expansion').show(user.get('username'), user.get('uploaded_avatar_id'));
return true;
},

View File

@ -15,13 +15,13 @@ Discourse.TopicRoute = Discourse.Route.extend({
actions: {
// Modals that can pop up within a topic
expandPostUser: function(post) {
this.controllerFor('poster-expansion').show(post.get('username'), post.get('uploaded_avatar_id'));
this.controllerFor('user-expansion').show(post.get('username'), post.get('uploaded_avatar_id'));
},
expandPostUsername: function(username) {
username = username.replace(/^@/, '');
if (!Em.isEmpty(username)) {
this.controllerFor('poster-expansion').show(username);
this.controllerFor('user-expansion').show(username);
}
},
@ -155,7 +155,7 @@ Discourse.TopicRoute = Discourse.Route.extend({
// Clear the search context
this.controllerFor('search').set('searchContext', null);
this.controllerFor('poster-expansion').set('visible', false);
this.controllerFor('user-expansion').set('visible', false);
var topicController = this.controllerFor('topic'),
postStream = topicController.get('postStream');

View File

@ -2,7 +2,7 @@
<div id='main-outlet' {{bind-attr class=backgroundClass}}>
{{outlet}}
{{render "poster-expansion"}}
{{render "user-expansion"}}
</div>
{{render "modal"}}

View File

@ -56,4 +56,4 @@ Discourse.PopupInputTipView = Discourse.View.extend({
}
});
Discourse.View.registerHelper('popupInputTip', Discourse.PopupInputTipView);
Discourse.View.registerHelper('popupInputTip', Discourse.PopupInputTipView);

View File

@ -1,9 +1,9 @@
import CleansUp from 'discourse/mixins/cleans-up';
var clickOutsideEventName = "mousedown.outside-poster-expansion";
var clickOutsideEventName = "mousedown.outside-user-expansion";
export default Discourse.View.extend(CleansUp, {
elementId: 'poster-expansion',
elementId: 'user-expansion',
classNameBindings: ['controller.visible::hidden', 'controller.showBadges'],
_setup: function() {

View File

@ -1,6 +1,6 @@
// styles that apply to the "share" popup when sharing a link to a post or topic
#poster-expansion {
#user-expansion {
position: absolute;
width: 460px;
left: 20px;

View File

@ -126,7 +126,7 @@ page.runTests = function(){
});
test("has details",function(){
return $('#poster-expansion .names').length === 1;
return $('#user-expansion .names').length === 1;
});
run();