0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/client/utils/link-view.js
Fabian Becker 1f8b323285 Remove active class from buttons.
refs #3989
- Remove active class from {{#link-to tagName="button" ..}}
2014-09-09 22:21:39 +00:00

13 lines
357 B
JavaScript

Ember.LinkView.reopen({
active: Ember.computed('resolvedParams', 'routeArgs', function () {
var isActive = this._super();
Ember.set(this, 'alternateActive', isActive);
return isActive;
}),
activeClass: Ember.computed('tagName', function () {
return this.get('tagName') === 'button' ? '' : 'active';
})
});