Merge pull request #4596 from techAPJ/composer

FEATURE: show close button instead of maximize in collapsed composer
This commit is contained in:
Arpit Jalan 2016-12-08 21:31:54 +05:30 committed by GitHub
commit 3d4299151c
4 changed files with 24 additions and 21 deletions

View File

@ -388,19 +388,14 @@ export default Ember.Controller.extend({
toggle() {
this.closeAutocomplete();
switch (this.get('model.composeState')) {
case Composer.OPEN:
if (Ember.isEmpty(this.get('model.reply')) && Ember.isEmpty(this.get('model.title'))) {
this.close();
} else {
this.shrink();
}
break;
case Composer.DRAFT:
this.set('model.composeState', Composer.OPEN);
break;
case Composer.SAVING:
if (this.get('model.composeState') === Composer.OPEN) {
if (Ember.isEmpty(this.get('model.reply')) && Ember.isEmpty(this.get('model.title'))) {
this.close();
} else {
this.shrink();
}
} else {
this.close();
}
return false;
},

View File

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

View File

@ -187,11 +187,15 @@
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
.draft-text {
display: block;
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
content: "\f00d";
}
}
}

View File

@ -97,17 +97,21 @@ input {
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
.draft-text {
display: block;
position: absolute;
margin-right: 40px;
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
position: absolute;
margin-right: 40px;
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
content: "\f00d";
}
}
}