work in progress, several bugs
This commit is contained in:
@@ -7,6 +7,12 @@ var FilterCriteriaActions = {
|
||||
actionType: FilterCriteriaConstants.CLEAR_CATEGORY_FILTERS
|
||||
});
|
||||
},
|
||||
setAppliedCategoryFilters: function(filters) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: FilterCriteriaConstants.SET_APPLIED_CATEGORY_FILTER,
|
||||
filters: filters
|
||||
});
|
||||
},
|
||||
addAppliedCategoryFilter: function(name, value) {
|
||||
AppDispatcher.handleAction({
|
||||
actionType: FilterCriteriaConstants.ADD_APPLIED_CATEGORY_FILTER,
|
||||
|
||||
@@ -24,14 +24,17 @@ var NavigationActions = {
|
||||
goToCategory: function(category,section, query) {
|
||||
var url ='/sekcija/' + section.get('name') +'/kategorija/'+ category.get('id') + '/' + category.get('name');
|
||||
|
||||
q = '';
|
||||
var q = '';
|
||||
if(query) {
|
||||
q = '?';
|
||||
var qp = [];
|
||||
for(var key in query) {
|
||||
if (query.hasOwnProperty(key)) {
|
||||
q += "&" + key + '=' + query[key];
|
||||
qp.push(key + '=' + query[key]);
|
||||
}
|
||||
}
|
||||
if (qp.length > 0) {
|
||||
q = '?' + qp.join('&');
|
||||
}
|
||||
}
|
||||
AppDispatcher.handleAction({
|
||||
actionType: NavigationConstants.CHANGE_URL,
|
||||
|
||||
Reference in New Issue
Block a user