2014-09-15 16:08:26 +00:00
|
|
|
var ActionTypes = {
|
2014-09-17 13:22:42 +00:00
|
|
|
UPDATE_SETTINGS: "update_settings",
|
|
|
|
ADD_EVENT: "add_event"
|
2014-09-15 16:08:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
var SettingsActions = {
|
2014-09-17 00:13:37 +00:00
|
|
|
update: function (settings) {
|
2014-09-15 22:56:43 +00:00
|
|
|
settings = _.merge({}, SettingsStore.getAll(), settings);
|
|
|
|
//TODO: Update server.
|
2014-09-15 22:05:06 +00:00
|
|
|
|
2014-09-15 22:56:43 +00:00
|
|
|
//Facebook Flux: We do an optimistic update on the client already.
|
|
|
|
AppDispatcher.dispatchViewAction({
|
2014-09-17 13:22:42 +00:00
|
|
|
type: ActionTypes.UPDATE_SETTINGS,
|
2014-09-15 22:56:43 +00:00
|
|
|
settings: settings
|
|
|
|
});
|
|
|
|
}
|
2014-09-16 04:26:16 +00:00
|
|
|
};
|