2015-01-25 10:26:10 +01:00
|
|
|
var AppDispatcher = require('../dispatcher/appDispatcher');
|
|
|
|
|
var ItemConstants = require('../constants/itemConstants');
|
|
|
|
|
|
|
|
|
|
// Define action methods
|
|
|
|
|
var ItemActions = {
|
|
|
|
|
|
2015-02-15 14:21:50 +01:00
|
|
|
loadByCategory: function(categoryId, offset, limit, query) {
|
2015-02-04 06:51:49 +01:00
|
|
|
AppDispatcher.handleAction({
|
|
|
|
|
actionType: ItemConstants.LOAD_BY_CATEGORY,
|
2015-02-11 07:11:28 +01:00
|
|
|
categoryId : categoryId,
|
2015-02-15 14:21:50 +01:00
|
|
|
query : query,
|
|
|
|
|
offset : offset,
|
|
|
|
|
limit: limit
|
2015-02-04 06:51:49 +01:00
|
|
|
});
|
|
|
|
|
},
|
2015-01-25 10:26:10 +01:00
|
|
|
|
|
|
|
|
loadFrontPageItems: function() {
|
|
|
|
|
AppDispatcher.handleAction({
|
|
|
|
|
actionType: ItemConstants.LOAD_FOR_FRONTPAGE
|
2015-01-31 13:31:56 +01:00
|
|
|
});
|
2015-01-28 05:04:45 +01:00
|
|
|
},
|
2015-01-25 10:26:10 +01:00
|
|
|
|
2015-01-28 05:04:45 +01:00
|
|
|
loadItemWithDetails: function() {
|
|
|
|
|
AppDispatcher.handleAction({
|
|
|
|
|
actionType: ItemConstants.LOAD_ITEM_WITH_DETAILS,
|
2015-01-31 13:31:56 +01:00
|
|
|
});
|
|
|
|
|
},
|
2015-01-25 10:26:10 +01:00
|
|
|
|
2015-01-31 13:31:56 +01:00
|
|
|
loadBestSellingItemsForSection: function(sectionId) {
|
|
|
|
|
AppDispatcher.handleAction({
|
|
|
|
|
actionType : ItemConstants.LOAD_BSI_FOR_SECTION,
|
|
|
|
|
sectionId: sectionId
|
|
|
|
|
});
|
2015-03-23 07:21:53 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
loadBestSellingItemsForGroup: function(groupId) {
|
|
|
|
|
AppDispatcher.handleAction({
|
|
|
|
|
actionType : ItemConstants.LOAD_BSI_FOR_ITEM_GROUP,
|
|
|
|
|
groupId: groupId
|
|
|
|
|
});
|
2015-01-31 13:31:56 +01:00
|
|
|
}
|
2015-01-25 10:26:10 +01:00
|
|
|
};
|
|
|
|
|
|
2015-01-31 13:31:56 +01:00
|
|
|
module.exports = ItemActions;
|