mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
Merge pull request #4596 from techAPJ/composer
FEATURE: show close button instead of maximize in collapsed composer
This commit is contained in:
commit
3d4299151c
@ -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;
|
||||
},
|
||||
|
@ -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}}
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user