Files
old-ribica/front-ui/app/actions/itemActions.js
2015-02-15 14:21:50 +01:00

38 lines
911 B
JavaScript

var AppDispatcher = require('../dispatcher/appDispatcher');
var ItemConstants = require('../constants/itemConstants');
// Define action methods
var ItemActions = {
loadByCategory: function(categoryId, offset, limit, query) {
AppDispatcher.handleAction({
actionType: ItemConstants.LOAD_BY_CATEGORY,
categoryId : categoryId,
query : query,
offset : offset,
limit: limit
});
},
loadFrontPageItems: function() {
AppDispatcher.handleAction({
actionType: ItemConstants.LOAD_FOR_FRONTPAGE
});
},
loadItemWithDetails: function() {
AppDispatcher.handleAction({
actionType: ItemConstants.LOAD_ITEM_WITH_DETAILS,
});
},
loadBestSellingItemsForSection: function(sectionId) {
AppDispatcher.handleAction({
actionType : ItemConstants.LOAD_BSI_FOR_SECTION,
sectionId: sectionId
});
}
};
module.exports = ItemActions;