32 lines
775 B
JavaScript
32 lines
775 B
JavaScript
|
|
|
||
|
|
var Constants = require('../constants/CsvEditorConstants');
|
||
|
|
|
||
|
|
var CsvEditorDispatcher = assign(new Dispatcher(), {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @param {object} action The details of the action, including the action's
|
||
|
|
* type and additional data coming from the server.
|
||
|
|
*/
|
||
|
|
handleBackendAction: function(action) {
|
||
|
|
var payload = {
|
||
|
|
source: PayloadSources.BACKEND_ACTION,
|
||
|
|
action: action
|
||
|
|
};
|
||
|
|
this.dispatch(payload);
|
||
|
|
},
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @param {object} action The details of the action, including the action's
|
||
|
|
* type and additional data coming from the view.
|
||
|
|
*/
|
||
|
|
handleViewAction: function(action) {
|
||
|
|
var payload = {
|
||
|
|
source: PayloadSources.VIEW_ACTION,
|
||
|
|
action: action
|
||
|
|
};
|
||
|
|
this.dispatch(payload);
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
module.exports = CsvEditorDispatcher;
|