2017-08-22 10:53:26 +03:00
|
|
|
import Component from '@ember/component';
|
|
|
|
import {schedule} from '@ember/runloop';
|
2015-10-28 14:36:45 +03:00
|
|
|
|
|
|
|
export default Component.extend({
|
2014-04-02 06:09:28 +04:00
|
|
|
tagName: 'li',
|
|
|
|
classNameBindings: ['active'],
|
2014-12-10 19:31:40 +03:00
|
|
|
active: false,
|
2015-05-27 23:10:47 +03:00
|
|
|
linkClasses: null,
|
2014-12-10 19:31:40 +03:00
|
|
|
|
2015-12-15 14:09:34 +03:00
|
|
|
click() {
|
2014-12-10 19:31:40 +03:00
|
|
|
this.$('a').blur();
|
2015-12-15 14:09:34 +03:00
|
|
|
},
|
2015-07-09 00:08:36 +03:00
|
|
|
|
|
|
|
actions: {
|
2015-10-28 14:36:45 +03:00
|
|
|
setActive(value) {
|
2016-06-30 21:14:25 +03:00
|
|
|
schedule('afterRender', this, function () {
|
2015-07-09 00:08:36 +03:00
|
|
|
this.set('active', value);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2014-04-02 06:09:28 +04:00
|
|
|
});
|