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