From 1acceb941d84775cdeb0019bdfbdd63e9e125982 Mon Sep 17 00:00:00 2001 From: rr- Date: Fri, 20 Jan 2017 21:51:04 +0100 Subject: client: refactor linking and routing Print all links through new uri.js component Refactor the router to use more predictable parsing Fix linking to entities with weird names (that contain slashes, + etc.) --- client/js/controllers/help_controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/js/controllers/help_controller.js') diff --git a/client/js/controllers/help_controller.js b/client/js/controllers/help_controller.js index 2010176..8e65346 100644 --- a/client/js/controllers/help_controller.js +++ b/client/js/controllers/help_controller.js @@ -12,13 +12,13 @@ class HelpController { } module.exports = router => { - router.enter('/help', (ctx, next) => { + router.enter(['help'], (ctx, next) => { new HelpController(); }); - router.enter('/help/:section', (ctx, next) => { + router.enter(['help', ':section'], (ctx, next) => { new HelpController(ctx.parameters.section); }); - router.enter('/help/:section/:subsection', (ctx, next) => { + router.enter(['help', ':section', ':subsection'], (ctx, next) => { new HelpController(ctx.parameters.section, ctx.parameters.subsection); }); }; -- cgit v1.3