Adds a body class for static routes

This commit is contained in:
Robin Ward 2016-04-19 10:27:11 -04:00
parent c4cf057d07
commit 4cdd1e2e24
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D

View File

@ -4,6 +4,18 @@ import { on } from 'ember-addons/ember-computed-decorators';
export default Ember.View.extend(ScrollTop, {
@on('didInsertElement')
_addBodyClass() {
const path = this.get('controller.model.path');
$('body').addClass(`static-${path}`);
},
@on('willDestroyElement')
_removeBodyClass() {
const path = this.get('controller.model.path');
$('body').removeClass(`static-${path}`);
},
@on('didInsertElement')
_checkRead() {
const currentUser = this.get('controller.currentUser');