groups of articles now shown on ribica.ba/group/1/, background is in cloudinary
This commit is contained in:
@@ -5,10 +5,24 @@ var NavigationConstants = require('../constants/navigationConstants')
|
||||
var _ = require('underscore');
|
||||
|
||||
|
||||
|
||||
|
||||
var getGroupIdFromUrl = function() {
|
||||
console.log("yeee" , match);
|
||||
// ugly but it seems to me that
|
||||
// router does not want to expose its
|
||||
// state (for phylosophical reasons)
|
||||
var url = document.URL;
|
||||
var itemIdRegex = /grupa\/(\d+)\//g;
|
||||
var match = itemIdRegex.exec(url);
|
||||
console.log(match);
|
||||
return match[1];
|
||||
};
|
||||
|
||||
// Extend ItemStore with EventEmitter to add eventing capabilities
|
||||
var NavigationStore = _.extend({}, EventEmitter.prototype, {
|
||||
|
||||
|
||||
getGroupIdFromUrl: getGroupIdFromUrl,
|
||||
|
||||
// Emit Change event
|
||||
emitChange: function() {
|
||||
@@ -29,6 +43,8 @@ var NavigationStore = _.extend({}, EventEmitter.prototype, {
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Register callback with AppDispatcher
|
||||
NavigationStore.dispatchToken = AppDispatcher.register(function(payload) {
|
||||
var action = payload.action;
|
||||
|
||||
Reference in New Issue
Block a user