Ghost/ghost/admin/app/components/gh-activating-list-item.js
Kevin Ansfield b0e357138b Remove use of Ember.on
no issue
- removes the few uses of `Ember.on` for lifecycle hooks or event hooks where order may be important

`Ember.on` use is discouraged so although we haven't used it often I felt like we should ensure we're consistent throughout the codebase. There's a great article with details of why it's discouraged here: http://notmessenger.com/proper-use-of-ember-on/
2016-01-12 20:48:15 +00:00

23 lines
423 B
JavaScript

import Ember from 'ember';
const {Component, run} = Ember;
export default Component.extend({
tagName: 'li',
classNameBindings: ['active'],
active: false,
linkClasses: null,
click() {
this.$('a').blur();
},
actions: {
setActive(value) {
run.schedule('afterRender', this, function () {
this.set('active', value);
});
}
}
});