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"}}
@@ -34,4 +34,4 @@
-{{/disable-custom-stylesheets}} +{{/admin-wrapper}} diff --git a/app/assets/javascripts/discourse/initializers/live-development.js.es6 b/app/assets/javascripts/discourse/initializers/live-development.js.es6 index ef6d02cd946..79b200107a7 100644 --- a/app/assets/javascripts/discourse/initializers/live-development.js.es6 +++ b/app/assets/javascripts/discourse/initializers/live-development.js.es6 @@ -7,22 +7,6 @@ export default { initialize(container) { const messageBus = container.lookup('message-bus:main'); - // subscribe to any site customizations that are loaded - $('link.custom-css').each(function() { - const split = this.href.split("/"), - id = split[split.length - 1].split(".css")[0], - self = this; - - return messageBus.subscribe("/file-change/" + id, function(data) { - if (!$(self).data('orig')) { - $(self).data('orig', self.href); - } - const orig = $(self).data('orig'); - - self.href = orig.replace(/v=.*/, "v=" + data); - }); - }); - // Custom header changes $('header.custom').each(function() { const header = $(this);