FEATURE: add glyphs in the composer 'save' button
This commit is contained in:
parent
ea6cab66cb
commit
948e0740c9
|
@ -140,6 +140,16 @@ Discourse.Composer = Discourse.Model.extend({
|
|||
return (this.get('titleLength') <= Discourse.SiteSettings.max_topic_title_length);
|
||||
}.property('minimumTitleLength', 'titleLength', 'post.static_doc'),
|
||||
|
||||
// The icon for the save button
|
||||
saveIcon: function () {
|
||||
switch (this.get('action')) {
|
||||
case EDIT: return '<i class="fa fa-pencil"></i>';
|
||||
case REPLY: return '<i class="fa fa-reply"></i>';
|
||||
case CREATE_TOPIC: return '<i class="fa fa-plus"></i>';
|
||||
case PRIVATE_MESSAGE: return '<i class="fa fa-envelope"></i>';
|
||||
}
|
||||
}.property('action'),
|
||||
|
||||
// The text for the save button
|
||||
saveText: function() {
|
||||
switch (this.get('action')) {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
{{#if currentUser}}
|
||||
<div class='submit-panel'>
|
||||
<button {{action save}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{model.saveText}}</button>
|
||||
<button {{action save}} tabindex="5" {{bind-attr class=":btn :btn-primary :create disableSubmit:disabled"}} title="{{i18n composer.title}}">{{{model.saveIcon}}}{{model.saveText}}</button>
|
||||
<a href='#' {{action cancel}} class='cancel' tabindex="6">{{i18n cancel}}</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in New Issue