mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
use the view instead
This commit is contained in:
parent
043e522f39
commit
cd423f4a43
3 changed files with 8 additions and 15 deletions
|
@ -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");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -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")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue