parent
2f7e3c1c3c
commit
b4e8a39c2c
@ -0,0 +1,26 @@
|
||||
var $ = require('jquery');
|
||||
var _ = require('underscore');
|
||||
var UiSettingsModel = require('./UiSettingsModel');
|
||||
|
||||
var Controller = {
|
||||
|
||||
appInitializer : function() {
|
||||
|
||||
UiSettingsModel.on('sync', this._updateUiSettings);
|
||||
|
||||
this._updateUiSettings();
|
||||
},
|
||||
|
||||
_updateUiSettings: function() {
|
||||
|
||||
if (UiSettingsModel.get('enableColorImpairedMode')) {
|
||||
$('body').addClass('color-impaired-mode');
|
||||
} else {
|
||||
$('body').removeClass('color-impaired-mode');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_.bindAll(Controller, 'appInitializer');
|
||||
|
||||
module.exports = Controller;
|
Loading…
Reference in new issue