From a3c148407cffd1429baef55fb44c041b6f64e787 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 5 Jun 2014 12:09:08 -0400 Subject: [PATCH] Mobile: don't show edit reason and in reply to details in composer --- app/assets/javascripts/discourse/models/composer.js | 10 ++++++---- .../discourse/templates/composer.js.handlebars | 2 +- app/assets/stylesheets/mobile/compose.scss | 3 +++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/models/composer.js b/app/assets/javascripts/discourse/models/composer.js index 30a5f9ec05b..1aaa38ffbda 100644 --- a/app/assets/javascripts/discourse/models/composer.js +++ b/app/assets/javascripts/discourse/models/composer.js @@ -74,10 +74,12 @@ Discourse.Composer = Discourse.Model.extend({ username: this.get('post.username') }); - var replyUsername = post.get('reply_to_user.username'); - var replyAvatarTemplate = post.get('reply_to_user.avatar_template'); - if (replyUsername && replyAvatarTemplate && this.get('action') === EDIT) { - postDescription += " " + I18n.t("post.in_reply_to") + " " + Discourse.Utilities.tinyAvatar(replyAvatarTemplate) + " " + replyUsername; + if (!Discourse.Mobile.mobileView) { + var replyUsername = post.get('reply_to_user.username'); + var replyAvatarTemplate = post.get('reply_to_user.avatar_template'); + if (replyUsername && replyAvatarTemplate && this.get('action') === EDIT) { + postDescription += " " + I18n.t("post.in_reply_to") + " " + Discourse.Utilities.tinyAvatar(replyAvatarTemplate) + " " + replyUsername; + } } } diff --git a/app/assets/javascripts/discourse/templates/composer.js.handlebars b/app/assets/javascripts/discourse/templates/composer.js.handlebars index 83d35181eef..af51ac6963e 100644 --- a/app/assets/javascripts/discourse/templates/composer.js.handlebars +++ b/app/assets/javascripts/discourse/templates/composer.js.handlebars @@ -19,7 +19,7 @@ {{textField value=editReason tabindex="5" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}} {{else}} - {{i18n composer.show_edit_reason}} + {{i18n composer.show_edit_reason}} {{/if}} {{/if}} diff --git a/app/assets/stylesheets/mobile/compose.scss b/app/assets/stylesheets/mobile/compose.scss index e60c11e8086..02836aca330 100644 --- a/app/assets/stylesheets/mobile/compose.scss +++ b/app/assets/stylesheets/mobile/compose.scss @@ -201,6 +201,9 @@ display: none; } } } + .edit-reason-input, .display-edit-reason { + display: none; + } .edit-reason-input { display: inline-block; margin-left: 2px;