mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Work on composer, early implementation of replying
This commit is contained in:
16
ember/app/mixins/add-css-class-to-body.js
Normal file
16
ember/app/mixins/add-css-class-to-body.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Mixin.create({
|
||||
activate: function() {
|
||||
var cssClass = this.toCssClass();
|
||||
Ember.$('body').addClass(cssClass);
|
||||
},
|
||||
|
||||
deactivate: function() {
|
||||
Ember.$('body').removeClass(this.toCssClass());
|
||||
},
|
||||
|
||||
toCssClass: function() {
|
||||
return this.routeName.replace(/\./g, '-').dasherize();
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user