diff options
Diffstat (limited to 'web/src/js/actions.js')
-rw-r--r-- | web/src/js/actions.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web/src/js/actions.js b/web/src/js/actions.js new file mode 100644 index 00000000..6eecd78e --- /dev/null +++ b/web/src/js/actions.js @@ -0,0 +1,17 @@ +var ActionTypes = { + SETTINGS_UPDATE: "SETTINGS_UPDATE", + EVENTLOG_ADD: "EVENTLOG_ADD" +}; + +var SettingsActions = { + update:function(settings) { + settings = _.merge({}, SettingsStore.getAll(), settings); + //TODO: Update server. + + //Facebook Flux: We do an optimistic update on the client already. + AppDispatcher.dispatchViewAction({ + actionType: ActionTypes.SETTINGS_UPDATE, + settings: settings + }); + } +}; |