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({ Discourse.AdminRoute = Discourse.Route.extend({
titleToken: function() { titleToken: function() {
return I18n.t('admin_title'); 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({ export default Discourse.View.extend({
_onInsert: function() { _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? def customization_disabled?
controller.class.name.split("::").first == "Admin" || session[:disable_customization] session[:disable_customization]
end end
def category_badge(category, opts=nil) def category_badge(category, opts=nil)