Skip to content

Commit

Permalink
FEATURE: display reply to post on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Sep 16, 2014
1 parent 0855fe5 commit b62aaf5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/discourse/templates/post.js.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
{{#if loadingReplyHistory}}
{{i18n loading}}
{{else}}
<i class="fa fa-mail-forward"></i>&nbsp;
<i class="fa fa-mail-forward"></i>
{{avatar reply_to_user imageSize="tiny"}}
{{reply_to_user.username}}
<span>{{reply_to_user.username}}</span>
{{/if}}
</a>
{{/if}}
Expand Down
5 changes: 5 additions & 0 deletions app/assets/javascripts/discourse/views/post_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
topicController = this.get('controller'),
origScrollTop = $(window).scrollTop();

if (Discourse.Mobile.mobileView) {
Discourse.URL.routeTo(this.get('post.topic').urlForPostNumber(this.get('post.reply_to_post_number')));
return;
}


if (replyHistory.length > 0) {
var origHeight = this.$('.embedded-posts.top').height();
Expand Down
6 changes: 5 additions & 1 deletion app/assets/stylesheets/mobile/topic-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ button {
}

a.reply-to-tab {
display: none;
position: absolute;
z-index: 400;
right: 80px;
color: scale-color($primary, $lightness: 50%);
span { display: none; }
}

a.star {
Expand Down

0 comments on commit b62aaf5

Please sign in to comment.