2016-06-30 20:14:25 +02:00
|
|
|
import Component from 'ember-component';
|
|
|
|
import {schedule} from 'ember-runloop';
|
2015-10-28 12:36:45 +01:00
|
|
|
|
|
|
|
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-12-15 12:09:34 +01:00
|
|
|
click() {
|
2014-12-10 17:31:40 +01:00
|
|
|
this.$('a').blur();
|
2015-12-15 12:09:34 +01:00
|
|
|
},
|
2015-07-08 23:08:36 +02:00
|
|
|
|
|
|
|
actions: {
|
2015-10-28 12:36:45 +01:00
|
|
|
setActive(value) {
|
2016-06-30 20:14:25 +02:00
|
|
|
schedule('afterRender', this, function () {
|
2015-07-08 23:08:36 +02:00
|
|
|
this.set('active', value);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2014-04-02 04:09:28 +02:00
|
|
|
});
|