mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
b0e357138b
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/
23 lines
423 B
JavaScript
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);
|
|
});
|
|
}
|
|
}
|
|
});
|