aboutsummaryrefslogtreecommitdiff
path: root/client/js/controllers/help_controller.js
diff options
context:
space:
mode:
authorrr-2016-06-12 20:11:43 +0200
committerrr-2016-06-12 21:43:20 +0200
commit76882b59ef15e6259fc5901db93845478913d250 (patch)
tree8daa499f47eaccd1bd7799821c4825b471ecd7e2 /client/js/controllers/help_controller.js
parent4295e1c827fd3882bb3f683802912d85d858efb6 (diff)
client/router: introduce own router
I'm tired of page.js lack of documentation around finer quirks, and being forced to read its crap code. Refactored into classes, removed unused cruft.
Diffstat (limited to 'client/js/controllers/help_controller.js')
-rw-r--r--client/js/controllers/help_controller.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/js/controllers/help_controller.js b/client/js/controllers/help_controller.js
index 6c352c3..73c1896 100644
--- a/client/js/controllers/help_controller.js
+++ b/client/js/controllers/help_controller.js
@@ -1,6 +1,6 @@
'use strict';
-const page = require('page');
+const router = require('../router.js');
const topNavController = require('../controllers/top_nav_controller.js');
const HelpView = require('../views/help_view.js');
@@ -10,11 +10,13 @@ class HelpController {
}
registerRoutes() {
- page('/help', () => { this._showHelpRoute(); });
- page(
+ router.enter(
+ '/help',
+ (ctx, next) => { this._showHelpRoute(); });
+ router.enter(
'/help/:section',
(ctx, next) => { this._showHelpRoute(ctx.params.section); });
- page(
+ router.enter(
'/help/:section/:subsection',
(ctx, next) => {
this._showHelpRoute(ctx.params.section, ctx.params.subsection);

© 2015 - 2026 Jakob L. Kreuze