aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/stores/settingstore.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/stores/settingstore.js')
-rw-r--r--web/src/js/stores/settingstore.js31
1 files changed, 17 insertions, 14 deletions
diff --git a/web/src/js/stores/settingstore.js b/web/src/js/stores/settingstore.js
index 5ceed7db..9139076e 100644
--- a/web/src/js/stores/settingstore.js
+++ b/web/src/js/stores/settingstore.js
@@ -1,18 +1,20 @@
-for(var EventEmitter____Key in EventEmitter){if(EventEmitter.hasOwnProperty(EventEmitter____Key)){_SettingsStore[EventEmitter____Key]=EventEmitter[EventEmitter____Key];}}var ____SuperProtoOfEventEmitter=EventEmitter===null?null:EventEmitter.prototype;_SettingsStore.prototype=Object.create(____SuperProtoOfEventEmitter);_SettingsStore.prototype.constructor=_SettingsStore;_SettingsStore.__superConstructor__=EventEmitter;
- function _SettingsStore() {"use strict";
- EventEmitter.call(this);
+"use strict";
- //FIXME: What do we do if we haven't requested anything from the server yet?
- this.settings = {
- version: "0.12",
- showEventLog: true,
- mode: "transparent",
- };
- }
- _SettingsStore.prototype.getAll=function() {"use strict";
+function _SettingsStore() {
+ EventEmitter.call(this);
+
+ //FIXME: What do we do if we haven't requested anything from the server yet?
+ this.settings = {
+ version: "0.12",
+ showEventLog: true,
+ mode: "transparent",
+ };
+}
+_.extend(_SettingsStore.prototype, EventEmitter.prototype, {
+ getAll: function() {
return this.settings;
- };
- _SettingsStore.prototype.handle=function(action) {"use strict";
+ },
+ handle: function(action) {
switch (action.actionType) {
case ActionTypes.SETTINGS_UPDATE:
this.settings = action.settings;
@@ -21,7 +23,8 @@ for(var EventEmitter____Key in EventEmitter){if(EventEmitter.hasOwnProperty(Even
default:
return;
}
- };
+ }
+});
var SettingsStore = new _SettingsStore();
AppDispatcher.register(SettingsStore.handle.bind(SettingsStore));