diff --git a/ghost/admin/app/components/gh-datetime-input.js b/ghost/admin/app/components/gh-datetime-input.js index 09e2b1b4bb..de4e34d502 100644 --- a/ghost/admin/app/components/gh-datetime-input.js +++ b/ghost/admin/app/components/gh-datetime-input.js @@ -2,6 +2,7 @@ import Ember from 'ember'; import TextInputMixin from 'ghost/mixins/text-input'; import boundOneWay from 'ghost/utils/bound-one-way'; import {formatDate} from 'ghost/utils/date-formatting'; +import {invokeAction} from 'ember-invoke-action'; const {Component} = Ember; @@ -27,6 +28,6 @@ export default Component.extend(TextInputMixin, { focusOut() { let datetime = this.get('datetime'); - this.get('update')(datetime); + invokeAction(this, 'update', datetime); } }); diff --git a/ghost/admin/app/components/gh-ed-editor.js b/ghost/admin/app/components/gh-ed-editor.js index da7626a048..a927458bc1 100644 --- a/ghost/admin/app/components/gh-ed-editor.js +++ b/ghost/admin/app/components/gh-ed-editor.js @@ -2,6 +2,7 @@ import Ember from 'ember'; import EditorAPI from 'ghost/mixins/ed-editor-api'; import EditorShortcuts from 'ghost/mixins/ed-editor-shortcuts'; import EditorScroll from 'ghost/mixins/ed-editor-scroll'; +import {invokeAction} from 'ember-invoke-action'; const {TextArea, run} = Ember; @@ -32,7 +33,7 @@ export default TextArea.extend(EditorAPI, EditorShortcuts, EditorScroll, { this.setFocus(); - this.get('setEditor')(this); + invokeAction(this, 'setEditor', this); run.scheduleOnce('afterRender', this, this.afterRenderEvent); }, @@ -45,7 +46,7 @@ export default TextArea.extend(EditorAPI, EditorShortcuts, EditorScroll, { actions: { toggleCopyHTMLModal(generatedHTML) { - this.get('toggleCopyHTMLModal')(generatedHTML); + invokeAction(this, 'toggleCopyHTMLModal', generatedHTML); } } }); diff --git a/ghost/admin/app/components/gh-search-input/trigger.js b/ghost/admin/app/components/gh-search-input/trigger.js index e004203b97..6559b36d2e 100644 --- a/ghost/admin/app/components/gh-search-input/trigger.js +++ b/ghost/admin/app/components/gh-search-input/trigger.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import {invokeAction} from 'ember-invoke-action'; const {run, isBlank, Component} = Ember; @@ -21,7 +22,7 @@ export default Component.extend({ run.scheduleOnce('afterRender', this, isBlank(term) ? this.close : this.open); } - this.get('select.actions.search')(term); + invokeAction(this, 'select.actions.search', term); }, focusInput() { diff --git a/ghost/admin/app/components/gh-tag-settings-form.js b/ghost/admin/app/components/gh-tag-settings-form.js index c768a6b71d..b892cf3140 100644 --- a/ghost/admin/app/components/gh-tag-settings-form.js +++ b/ghost/admin/app/components/gh-tag-settings-form.js @@ -109,15 +109,15 @@ export default Component.extend({ actions: { setProperty(property, value) { - this.get('setProperty')(property, value); + invokeAction(this, 'setProperty', property, value); }, setCoverImage(image) { - this.get('setProperty')('image', image); + invokeAction(this, 'setProperty', 'image', image); }, clearCoverImage() { - this.get('setProperty')('image', ''); + invokeAction(this, 'setProperty', 'image', ''); }, openMeta() { diff --git a/ghost/admin/app/mixins/ed-editor-scroll.js b/ghost/admin/app/mixins/ed-editor-scroll.js index 355e7be99a..df483b6006 100644 --- a/ghost/admin/app/mixins/ed-editor-scroll.js +++ b/ghost/admin/app/mixins/ed-editor-scroll.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import {invokeAction} from 'ember-invoke-action'; const {Mixin, run} = Ember; @@ -61,7 +62,7 @@ export default Mixin.create({ */ scrollHandler() { this.set('scrollThrottle', run.throttle(this, () => { - this.get('updateScrollInfo')(this.getScrollInfo()); + invokeAction(this, 'updateScrollInfo', this.getScrollInfo()); }, 10)); }, diff --git a/ghost/admin/app/utils/link-component.js b/ghost/admin/app/utils/link-component.js index 2edcec4ba7..64367a5b96 100644 --- a/ghost/admin/app/utils/link-component.js +++ b/ghost/admin/app/utils/link-component.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import {invokeAction} from 'ember-invoke-action'; const {LinkComponent, computed} = Ember; @@ -7,7 +8,7 @@ LinkComponent.reopen({ let isActive = this._super(...arguments); if (typeof this.get('alternateActive') === 'function') { - this.get('alternateActive')(isActive); + invokeAction(this, 'alternateActive', isActive); } return isActive;