Files
old-ribica/front-ui/app/actions/sectionActions.js
2015-01-31 13:31:56 +01:00

37 lines
810 B
JavaScript

var AppDispatcher = require('../dispatcher/appDispatcher');
var SectionConstants = require('../constants/sectionConstants');
// Define action methods
var SectionActions = {
loadSections: function() {
AppDispatcher.handleAction({
actionType: SectionConstants.LOAD_SECTIONS
})
},
setSectionHover: function(section) {
AppDispatcher.handleAction({
actionType: SectionConstants.SET_SECTION_HOVER,
section: section
});
},
unsetSectionHover: function() {
AppDispatcher.handleAction({
actionType: SectionConstants.UNSET_SECTION_HOVER
});
},
loadSectionDetails: function(sectionId) {
AppDispatcher.handleAction({
actionType: SectionConstants.LOAD_SECTION_DETAILS,
sectionId: sectionId
});
}
};
module.exports = SectionActions;