2015-02-13 05:22:32 +01:00
|
|
|
import Ember from 'ember';
|
2015-05-27 22:10:47 +02:00
|
|
|
|
2015-10-28 12:36:45 +01:00
|
|
|
const {Component, on, run} = Ember;
|
|
|
|
|
|
|
|
export default Component.extend({
|
2014-04-02 04:09:28 +02:00
|
|
|
tagName: 'li',
|
|
|
|
classNameBindings: ['active'],
|
2014-12-10 17:31:40 +01:00
|
|
|
active: false,
|
2015-05-27 22:10:47 +02:00
|
|
|
linkClasses: null,
|
2014-12-10 17:31:40 +01:00
|
|
|
|
2015-10-28 12:36:45 +01:00
|
|
|
unfocusLink: on('click', function () {
|
2014-12-10 17:31:40 +01:00
|
|
|
this.$('a').blur();
|
2015-09-03 13:06:50 +02:00
|
|
|
}),
|
2015-07-08 23:08:36 +02:00
|
|
|
|
|
|
|
actions: {
|
2015-10-28 12:36:45 +01:00
|
|
|
setActive(value) {
|
|
|
|
run.schedule('afterRender', this, function () {
|
2015-07-08 23:08:36 +02:00
|
|
|
this.set('active', value);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2014-04-02 04:09:28 +02:00
|
|
|
});
|