we are using flux now ... yaaay ...
This commit is contained in:
25
front-ui/app/actions/itemActions.js
Normal file
25
front-ui/app/actions/itemActions.js
Normal file
@@ -0,0 +1,25 @@
|
||||
var AppDispatcher = require('../dispatcher/appDispatcher');
|
||||
var ItemConstants = require('../constants/itemConstants');
|
||||
|
||||
// Define action methods
|
||||
var ItemActions = {
|
||||
|
||||
// select item
|
||||
selectItem: function(item) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: ItemConstants.SELECT_ITEM,
|
||||
item: item
|
||||
})
|
||||
},
|
||||
|
||||
loadFrontPageItems: function() {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: ItemConstants.LOAD_FOR_FRONTPAGE
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
module.exports = ItemActions;
|
||||
Reference in New Issue
Block a user