summaryrefslogtreecommitdiffstats
path: root/client/config
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-31 23:14:31 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-31 23:27:31 +0200
commit0ce381aa0a64de9a2165843dfe6ee493940f8c26 (patch)
treea8c48e79c58f1e651b45f74614be25477979de8c /client/config
parent549f8fee3aee3675ae2c04fa14b88f4a783df2c6 (diff)
downloadwekan-0ce381aa0a64de9a2165843dfe6ee493940f8c26.tar.gz
wekan-0ce381aa0a64de9a2165843dfe6ee493940f8c26.tar.bz2
wekan-0ce381aa0a64de9a2165843dfe6ee493940f8c26.zip
Fix the horizontal canvas scrolling on card opening
Diffstat (limited to 'client/config')
-rw-r--r--client/config/router.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/client/config/router.js b/client/config/router.js
index a3d8897d..77b17b63 100644
--- a/client/config/router.js
+++ b/client/config/router.js
@@ -7,12 +7,12 @@ FlowRouter.route('/', {
name: 'home',
triggersEnter: [AccountsTemplates.ensureSignedIn],
action: function() {
- EscapeActions.executeAll();
- Filter.reset();
-
Session.set('currentBoard', null);
Session.set('currentCard', null);
+ Filter.reset();
+ EscapeActions.executeAll();
+
BlazeLayout.render('defaultLayout', { content: 'boardList' });
}
});
@@ -21,15 +21,16 @@ FlowRouter.route('/b/:id/:slug', {
name: 'board',
action: function(params) {
let currentBoard = params.id;
+ let previousBoard = Session.get('currentBoard');
+ Session.set('currentBoard', currentBoard);
+ Session.set('currentCard', null);
+
// If we close a card, we'll execute again this route action but we don't
// want to excape every current actions (filters, etc.)
- if (Session.get('currentBoard') !== currentBoard) {
+ if (previousBoard !== currentBoard) {
EscapeActions.executeAll();
}
- Session.set('currentBoard', currentBoard);
- Session.set('currentCard', null);
-
BlazeLayout.render('defaultLayout', { content: 'board' });
}
});
@@ -37,10 +38,11 @@ FlowRouter.route('/b/:id/:slug', {
FlowRouter.route('/b/:boardId/:slug/:cardId', {
name: 'card',
action: function(params) {
- EscapeActions.executeUpTo('inlinedForm');
Session.set('currentBoard', params.boardId);
Session.set('currentCard', params.cardId);
+ EscapeActions.executeUpTo('inlinedForm');
+
BlazeLayout.render('defaultLayout', { content: 'board' });
}
});