DEV: Update DButton uses (#23333)

1. Use `this.` instead of `{{action}}` where applicable
2. Use `{{fn}}` instead of `@actionParam` where applicable
3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded
4. Remove `btn` class (it's added automatically to all DButtons)
5. Remove `type="button"` (it's the default)
6. Use `concat-class` helper
This commit is contained in:
Jarek Radosz
2023-08-31 11:49:35 +02:00
committed by GitHub
parent e1ae32103d
commit 1c87bb7fe9
237 changed files with 998 additions and 1091 deletions

View File

@ -73,7 +73,7 @@
{{#if this.canRemoveOption}}
<DButton
@icon="trash-alt"
@action={{action "removeOption" option}}
@action={{fn this.removeOption option}}
/>
{{/if}}
</div>
@ -81,10 +81,10 @@
<div class="poll-option-controls">
<DButton
class="btn-default poll-option-add"
@icon="plus"
@label="poll.ui_builder.poll_options.add"
@action={{fn this.addOption -1}}
class="btn-default poll-option-add"
/>
{{#if
(and
@ -230,24 +230,24 @@
</:body>
<:footer>
<DButton
@action={{action "insertPoll"}}
@action={{this.insertPoll}}
@icon="chart-bar"
class="btn-primary insert-poll"
@label="poll.ui_builder.insert"
@disabled={{this.disableInsert}}
class="btn-primary insert-poll"
/>
<DButton @label="cancel" @class="btn-flat" @action={{@closeModal}} />
<DButton @label="cancel" @action={{@closeModal}} class="btn-flat" />
<DButton
@action={{action "toggleAdvanced"}}
class="btn-default show-advanced"
@action={{this.toggleAdvanced}}
@icon="cog"
@title={{if
this.showAdvanced
"poll.ui_builder.hide_advanced"
"poll.ui_builder.show_advanced"
}}
class="btn-default show-advanced"
/>
</:footer>