2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2015-06-13 17:34:09 +03:00
|
|
|
|
|
|
|
Ember.LinkComponent.reopen({
|
|
|
|
active: Ember.computed('attrs.params', '_routing.currentState', function () {
|
2014-04-02 06:09:28 +04:00
|
|
|
var isActive = this._super();
|
|
|
|
|
2015-07-09 00:08:36 +03:00
|
|
|
if (typeof this.attrs.alternateActive === 'function') {
|
|
|
|
this.attrs.alternateActive(isActive);
|
|
|
|
}
|
2014-04-02 06:09:28 +04:00
|
|
|
|
|
|
|
return isActive;
|
2014-09-10 00:58:12 +04:00
|
|
|
}),
|
|
|
|
|
|
|
|
activeClass: Ember.computed('tagName', function () {
|
|
|
|
return this.get('tagName') === 'button' ? '' : 'active';
|
2014-04-02 06:09:28 +04:00
|
|
|
})
|
|
|
|
});
|