Ghost/ghost/admin/app/utils/link-view.js

15 lines
400 B
JavaScript
Raw Normal View History

2015-02-13 07:22:32 +03:00
import Ember from 'ember';
Ember.LinkView.reopen({
active: Ember.computed('loadedParams', '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';
})
});