REFACTOR: Remove deprecated `action="something"` attributes
In newer versions of Ember, `this.sendAction` is deprecated: https://deprecations.emberjs.com/v3.x/#toc_ember-component-send-action This patch removes most of our current uses (via `d-button`) but also some other rogue `this.sendAction` calls too.
This commit is contained in:
parent
da0dea1e94
commit
3d6d3e6cb1
|
@ -94,6 +94,8 @@ export default Component.extend({
|
|||
|
||||
if (action) {
|
||||
if (typeof action === "string") {
|
||||
// Note: This is deprecated in new Embers and needs to be removed in the future.
|
||||
// There is already a warning in the console.
|
||||
this.sendAction("action", this.actionParam);
|
||||
} else if (typeof action === "object" && action.value) {
|
||||
action.value(this.actionParam);
|
||||
|
|
|
@ -74,7 +74,7 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
deleteTag() {
|
||||
this.sendAction("deleteAction", this.tagInfo);
|
||||
this.deleteAction(this.tagInfo);
|
||||
},
|
||||
|
||||
unlinkSynonym(tag) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{#if visible}}
|
||||
<div class="row">
|
||||
<div id="banner" class={{overlay}}>
|
||||
{{d-button icon="times" action="dismiss" class="btn btn-flat close" title="banner.close"}}
|
||||
{{d-button icon="times" action=(action "dismiss") class="btn btn-flat close" title="banner.close"}}
|
||||
<div id="banner-content">
|
||||
{{html-safe content}}
|
||||
{{#if currentUser.staff}}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</span>
|
||||
{{d-button
|
||||
icon="times"
|
||||
action="dismiss"
|
||||
action=(action "dismiss")
|
||||
class="btn btn-flat close" title="banner.close"
|
||||
}}
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</span>
|
||||
{{d-button
|
||||
icon="times"
|
||||
action="dismiss"
|
||||
action=(action "dismiss")
|
||||
class="btn btn-flat close"
|
||||
title="banner.close"
|
||||
}}
|
||||
|
|
|
@ -34,6 +34,11 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{d-button action="close" class="btn btn-flat close" icon="times" aria-label="share.close" title="share.close"}}
|
||||
{{d-button action=(action "close")
|
||||
class="btn btn-flat close"
|
||||
icon="times"
|
||||
aria-label="share.close"
|
||||
title="share.close"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue