diff options
author | Ghassen Rjab <rjab.ghassen@gmail.com> | 2017-07-08 13:23:33 +0100 |
---|---|---|
committer | Ghassen Rjab <rjab.ghassen@gmail.com> | 2017-07-08 13:23:33 +0100 |
commit | 3f4c2855513646fbd826d0473b6304dbad1f3b16 (patch) | |
tree | cb9ba1943eed0e66989370992e69981bce68eb09 /config | |
parent | 61b2c91ffed53a616eeab0cee4e8b0c4eb7f764e (diff) | |
download | wekan-3f4c2855513646fbd826d0473b6304dbad1f3b16.tar.gz wekan-3f4c2855513646fbd826d0473b6304dbad1f3b16.tar.bz2 wekan-3f4c2855513646fbd826d0473b6304dbad1f3b16.zip |
Add import Wekan board feature
Diffstat (limited to 'config')
-rw-r--r-- | config/router.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/config/router.js b/config/router.js index 75f6ab58..d4d13be5 100644 --- a/config/router.js +++ b/config/router.js @@ -80,19 +80,16 @@ FlowRouter.route('/shortcuts', { }, }); -FlowRouter.route('/import', { +FlowRouter.route('/import/:source', { name: 'import', - triggersEnter: [ - AccountsTemplates.ensureSignedIn, - () => { - Session.set('currentBoard', null); - Session.set('currentCard', null); + triggersEnter: [AccountsTemplates.ensureSignedIn], + action(params) { + Session.set('currentBoard', null); + Session.set('currentCard', null); + Session.set('importSource', params.source); - Filter.reset(); - EscapeActions.executeAll(); - }, - ], - action() { + Filter.reset(); + EscapeActions.executeAll(); BlazeLayout.render('defaultLayout', { headerBar: 'importHeaderBar', content: 'import', @@ -132,6 +129,7 @@ const redirections = { '/boards': '/', '/boards/:id/:slug': '/b/:id/:slug', '/boards/:id/:slug/:cardId': '/b/:id/:slug/:cardId', + '/import': '/import/trello', }; _.each(redirections, (newPath, oldPath) => { |