use the view instead

This commit is contained in:
Régis Hanol 2015-02-20 18:21:19 +01:00
parent 043e522f39
commit cd423f4a43
3 changed files with 8 additions and 15 deletions

View file

@ -1,15 +1,5 @@
Discourse.AdminRoute = Discourse.Route.extend({
titleToken: function() {
return I18n.t('admin_title');
},
activate: function() {
this._super();
$("link.custom-css").attr("rel", "");
},
deactivate: function() {
this._super();
$("link.custom-css").attr("rel", "stylesheet");
}
});

View file

@ -1,6 +1,9 @@
export default Ember.View.extend({
_onInsert: function() {
export default Discourse.View.extend({
_disableCustomStylesheets: function() {
$("link.custom-css").attr("rel", "");
}.on("willInsertElement"),
}.on('didInsertElement')
_enableCustomStylesheets: function() {
$("link.custom-css").attr("rel", "stylesheet");
}.on("willDestroyElement")
});

View file

@ -151,7 +151,7 @@ module ApplicationHelper
def customization_disabled?
controller.class.name.split("::").first == "Admin" || session[:disable_customization]
session[:disable_customization]
end
def category_badge(category, opts=nil)