summaryrefslogtreecommitdiffstats
path: root/client/lib/utils.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-22 22:59:03 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-23 11:11:03 +0200
commitd5eec54c72b755522addc4a839810971ba24f813 (patch)
treeb3f9c1bfde7f4ebd9d2ddca54afa67783c19d983 /client/lib/utils.js
parentf315ee443061c916dc55b291bfe79503fa5e952f (diff)
downloadwekan-d5eec54c72b755522addc4a839810971ba24f813.tar.gz
wekan-d5eec54c72b755522addc4a839810971ba24f813.tar.bz2
wekan-d5eec54c72b755522addc4a839810971ba24f813.zip
Start the migration from iron-router to flow-router
Motivations: * Iron-Router foces us to use Tracker.nonreactive black magic in order to avoid un-necessary re-renders; * There is a community consensus (supported by some MDG members) that the flow-router API is easier to reason about; * The useraccounts now supports flow router (that was a blocking element when I considered the switch ~3months ago) On the server we use the Picker router, as encouraged by the Kadira team (which develop both Flow and Picker routers). In the current state of things there are some bugs related to the missing Loading architecure. Previously onRendered callback where always called when the data the component needed was available, now we have to handle this ourselves, which we will in a following commit.
Diffstat (limited to 'client/lib/utils.js')
-rw-r--r--client/lib/utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/lib/utils.js b/client/lib/utils.js
index 121b3c2b..c6a9adc5 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -2,8 +2,8 @@ Utils = {
// XXX We should remove these two methods
goBoardId: function(_id) {
var board = Boards.findOne(_id);
- return board && Router.go('Board', {
- _id: board._id,
+ return board && FlowRouter.go('board', {
+ id: board._id,
slug: board.slug
});
},
@@ -11,7 +11,7 @@ Utils = {
goCardId: function(_id) {
var card = Cards.findOne(_id);
var board = Boards.findOne(card.boardId);
- return board && Router.go('Card', {
+ return board && FlowRouter.go('card', {
cardId: card._id,
boardId: board._id,
slug: board.slug