We can add the `no-text` class automatically in `d-button`
This commit is contained in:
parent
62a59ef7c0
commit
8e603503e6
|
@ -21,10 +21,10 @@
|
|||
<div class="pull-right">
|
||||
<a {{bind-attr href="backup.link"}} class="btn download" title="{{i18n 'admin.backups.operations.download.title'}}">{{fa-icon "download"}}{{i18n 'admin.backups.operations.download.label'}}</a>
|
||||
{{#if isOperationRunning}}
|
||||
{{d-button icon="trash-o" action="destroyBackup" actionParam=backup class="btn-danger no-text" disabled="true" title="admin.backups.operations.is_running"}}
|
||||
{{d-button icon="trash-o" action="destroyBackup" actionParam=backup class="btn-danger" disabled="true" title="admin.backups.operations.is_running"}}
|
||||
{{d-button icon="play" action="startRestore" actionParam=backup disabled=restoreDisabled title=restoreTitle label="admin.backups.operations.restore.label"}}
|
||||
{{else}}
|
||||
{{d-button icon="trash-o" action="destroyBackup" actionParam=backup class="btn-danger no-text" title="admin.backups.operations.destroy.title"}}
|
||||
{{d-button icon="trash-o" action="destroyBackup" actionParam=backup class="btn-danger" title="admin.backups.operations.destroy.title"}}
|
||||
{{d-button icon="play" action="startRestore" actionParam=backup disabled=restoreDisabled title=restoreTitle label="admin.backups.operations.restore.label"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
</div>
|
||||
{{#if dirty}}
|
||||
<div class='setting-controls'>
|
||||
{{d-button class="ok no-text" action="save" icon="check"}}
|
||||
{{d-button class="cancel no-text" action="cancel" icon="times"}}
|
||||
{{d-button class="ok" action="save" icon="check"}}
|
||||
{{d-button class="cancel" action="cancel" icon="times"}}
|
||||
</div>
|
||||
{{else if setting.overridden}}
|
||||
{{d-button action="resetDefault" icon="undo" label="admin.site_settings.reset"}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{d-button action="removeValue"
|
||||
actionParam=value
|
||||
icon="times"
|
||||
class="btn-small no-text"}}
|
||||
class="btn-small"}}
|
||||
{{value}}
|
||||
</div>
|
||||
{{/each}}
|
||||
|
@ -14,5 +14,5 @@
|
|||
|
||||
<div class='input'>
|
||||
{{text-field value=newValue placeholderKey=addKey}}
|
||||
{{d-button action="addValue" icon="plus" class="btn-primary btn-small no-text" disabled=inputInvalid}}
|
||||
{{d-button action="addValue" icon="plus" class="btn-primary btn-small" disabled=inputInvalid}}
|
||||
</div>
|
||||
|
|
|
@ -350,8 +350,8 @@
|
|||
{{combo-box content=model.customGroups value=model.primary_group_id nameProperty="name" none="admin.groups.no_primary"}}
|
||||
{{/if}}
|
||||
{{#if primaryGroupDirty}}
|
||||
{{d-button icon="check" class="ok no-text" action="savePrimaryGroup"}}
|
||||
{{d-button icon="times" class="cancel no-text" action="resetPrimaryGroup"}}
|
||||
{{d-button icon="check" class="ok" action="savePrimaryGroup"}}
|
||||
{{d-button icon="times" class="cancel" action="resetPrimaryGroup"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,9 +2,11 @@ import { iconHTML } from 'discourse/helpers/fa-icon';
|
|||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'button',
|
||||
classNameBindings: [':btn'],
|
||||
classNameBindings: [':btn', 'noText'],
|
||||
attributeBindings: ['disabled', 'translatedTitle:title'],
|
||||
|
||||
noText: Ember.computed.empty('translatedLabel'),
|
||||
|
||||
translatedTitle: function() {
|
||||
const title = this.get('title');
|
||||
return title ? I18n.t(title) : this.get('translatedLabel');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#if selected}}
|
||||
<div id='bulk-select'>
|
||||
{{d-button action="showBulkActions" icon="wrench" class="no-text"}}
|
||||
{{d-button action="showBulkActions" icon="wrench"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div>
|
||||
<input type="radio" id="gravatar" name="avatar" value="gravatar" {{action "useGravatar"}}>
|
||||
<label class="radio" for="gravatar">{{bound-avatar controller "large" gravatar_avatar_upload_id}} {{{i18n 'user.change_avatar.gravatar'}}} {{email}}</label>
|
||||
{{d-button action="refreshGravatar" title="user.change_avatar.refresh_gravatar_title" disabled=gravatarRefreshDisabled class="no-text" icon="refresh"}}
|
||||
{{d-button action="refreshGravatar" title="user.change_avatar.refresh_gravatar_title" disabled=gravatarRefreshDisabled icon="refresh"}}
|
||||
</div>
|
||||
{{#if allowImageUpload}}
|
||||
<div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{#d-button action="enterTop" class="full no-text jump-top"}}
|
||||
{{#d-button action="enterTop" class="full jump-top"}}
|
||||
{{fa-icon 'caret-up'}} {{{topDate}}}
|
||||
{{/d-button}}
|
||||
|
||||
{{#d-button action="enterBottom" class="full no-text jump-button"}}
|
||||
{{#d-button action="enterBottom" class="full jump-button"}}
|
||||
{{{bottomDate}}} {{fa-icon 'caret-down'}}
|
||||
{{/d-button}}
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
{{plugin-outlet "edit-topic"}}
|
||||
|
||||
{{d-button action="finishedEditingTopic" class="btn-primary btn-small no-text submit-edit" icon="check"}}
|
||||
{{d-button action="cancelEditingTopic" class="btn-small no-text cancel-edit" icon="times"}}
|
||||
{{d-button action="finishedEditingTopic" class="btn-primary btn-small submit-edit" icon="check"}}
|
||||
{{d-button action="cancelEditingTopic" class="btn-small cancel-edit" icon="times"}}
|
||||
{{else}}
|
||||
<h1>
|
||||
{{#unless model.is_warning}}
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
{{! we want the "huge" version even though we're downsizing it to "large" in CSS }}
|
||||
{{bound-avatar model "huge"}}
|
||||
{{#if allowAvatarUpload}}
|
||||
{{d-button action="showAvatarSelector" class="pad-left no-text" icon="pencil"}}
|
||||
{{d-button action="showAvatarSelector" class="pad-left" icon="pencil"}}
|
||||
{{else}}
|
||||
{{#unless ssoOverridesAvatar}}
|
||||
<a href="//gravatar.com/emails" target="_blank" title="{{i18n 'user.change_avatar.gravatar_title'}}" class="btn no-text">{{fa-icon "pencil"}}</a>
|
||||
|
|
Loading…
Reference in New Issue