Merge pull request #4593 from techAPJ/composer

FEATURE: show the reply title and the reply icon in the minimized editor
This commit is contained in:
Arpit Jalan 2016-12-08 11:40:24 +05:30 committed by GitHub
commit 4381afac1b
3 changed files with 16 additions and 1 deletions

View File

@ -6,6 +6,8 @@ import { default as computed, observes } from 'ember-addons/ember-computed-decor
import { relativeAge } from 'discourse/lib/formatter';
import InputValidation from 'discourse/models/input-validation';
import { getOwner } from 'discourse-common/lib/get-owner';
import { escapeExpression } from 'discourse/lib/utilities';
import { emojiUnescape } from 'discourse/lib/text';
function loadDraft(store, opts) {
opts = opts || {};
@ -195,6 +197,11 @@ export default Ember.Controller.extend({
return this.get('model.creatingPrivateMessage');
}.property('model.creatingPrivateMessage', 'model.targetUsernames'),
@computed('model.topic')
draftTitle(topic) {
return emojiUnescape(escapeExpression(topic.get('title')));
},
actions: {
typed() {

View File

@ -135,7 +135,11 @@
{{/if}}
</div>
<div class='draft-text'>
{{i18n 'composer.saved_draft'}}
{{#if model.topic}}
{{fa-icon "reply"}} {{{draftTitle}}}
{{else}}
{{i18n "composer.saved_draft"}}
{{/if}}
</div>
</div>
</div>

View File

@ -99,6 +99,10 @@ input {
display: block;
position: absolute;
margin-right: 40px;
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.toggler {
&:before {