basic version of search implemented
This commit is contained in:
@@ -85,10 +85,13 @@ var NavigationActions = {
|
||||
actionType: NavigationConstants.CHANGE_URL,
|
||||
url: '/hvala'
|
||||
});
|
||||
},
|
||||
goToSearchResults : function(q) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: NavigationConstants.CHANGE_URL,
|
||||
url: '/pretraga?q=' + q
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
module.exports = NavigationActions;
|
||||
|
||||
20
front-ui/app/actions/searchActions.js
Normal file
20
front-ui/app/actions/searchActions.js
Normal file
@@ -0,0 +1,20 @@
|
||||
var AppDispatcher = require('../dispatcher/appDispatcher');
|
||||
var SearchContants = require('../constants/searchConstants');
|
||||
|
||||
// Define action methods
|
||||
var SearchActions = {
|
||||
searchBoxChange: function(q) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: SearchContants.SEARCH_BOX_CHANGE,
|
||||
q : q
|
||||
});
|
||||
},
|
||||
getSearchResults: function(q) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: SearchContants.GET_SEARCH_RESULTS,
|
||||
q : q
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SearchActions;
|
||||
Reference in New Issue
Block a user