diff --git a/app/assets/javascripts/admin/components/admin-wrapper.js.es6 b/app/assets/javascripts/admin/components/admin-wrapper.js.es6 new file mode 100644 index 00000000000..118728f66ca --- /dev/null +++ b/app/assets/javascripts/admin/components/admin-wrapper.js.es6 @@ -0,0 +1,11 @@ +export default Ember.Component.extend({ + didInsertElement() { + this._super(); + $('body').addClass('admin-interface'); + }, + + willDestroyElement() { + this._super(); + $('body').removeClass('admin-interface'); + } +}); diff --git a/app/assets/javascripts/admin/components/disable-custom-stylesheets.js.es6 b/app/assets/javascripts/admin/components/disable-custom-stylesheets.js.es6 deleted file mode 100644 index f4d86899d08..00000000000 --- a/app/assets/javascripts/admin/components/disable-custom-stylesheets.js.es6 +++ /dev/null @@ -1,14 +0,0 @@ -export default Ember.Component.extend({ - willInsertElement() { - this._super(); - if (this.session.get("disableCustomCSS")) { - $("link.custom-css").attr("rel", ""); - this.session.set("disableCustomCSS", false); - } - }, - - willDestroyElement() { - this._super(); - $("link.custom-css").attr("rel", "stylesheet"); - } -}); diff --git a/app/assets/javascripts/admin/templates/admin.hbs b/app/assets/javascripts/admin/templates/admin.hbs index 7f34c00b772..780aad41fcf 100644 --- a/app/assets/javascripts/admin/templates/admin.hbs +++ b/app/assets/javascripts/admin/templates/admin.hbs @@ -1,4 +1,4 @@ -{{#disable-custom-stylesheets class="container"}} +{{#admin-wrapper class="container"}}