FEATURE: add .admin-interface class to BODY when in admin
removes some dead code as well
This commit is contained in:
parent
66cc4fff2c
commit
c182dcc64c
|
@ -0,0 +1,11 @@
|
|||
export default Ember.Component.extend({
|
||||
didInsertElement() {
|
||||
this._super();
|
||||
$('body').addClass('admin-interface');
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
this._super();
|
||||
$('body').removeClass('admin-interface');
|
||||
}
|
||||
});
|
|
@ -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");
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
{{#disable-custom-stylesheets class="container"}}
|
||||
{{#admin-wrapper class="container"}}
|
||||
<div class="row">
|
||||
<div class="full-width">
|
||||
|
||||
|
@ -34,4 +34,4 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
{{/disable-custom-stylesheets}}
|
||||
{{/admin-wrapper}}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue