diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-07-31 15:23:53 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-07-31 15:23:53 +0200 |
commit | a9c832b003daa70ee78cacecc518cebdf4071ca1 (patch) | |
tree | 75978d446f22730fc859a24e999108ebdd461359 /public/javascripts | |
parent | 614817541a79ec0bbc90f8d6133db408b95dac35 (diff) |
Add MAVO version
Diffstat (limited to 'public/javascripts')
-rw-r--r-- | public/javascripts/featureDetect.js | 6 | ||||
-rw-r--r-- | public/javascripts/schedule.js | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/public/javascripts/featureDetect.js b/public/javascripts/featureDetect.js index 3a072a1..af3ada2 100644 --- a/public/javascripts/featureDetect.js +++ b/public/javascripts/featureDetect.js @@ -12,7 +12,11 @@ self._shouldCheck = function () { } self._redirect = function () { - window.location.href = 'http://www.meetingpointmco.nl/Roosters-AL/doc/' + if (process.env.SCHOOL_LEVEL === 'mavo') { + window.location.href = 'http://www.meetingpointmco.nl/Roosters-AL/TOSweb/' + } else { + window.location.href = 'http://www.meetingpointmco.nl/Roosters-AL/doc/' + } } self.check = function () { diff --git a/public/javascripts/schedule.js b/public/javascripts/schedule.js index bf87af5..1a2e62f 100644 --- a/public/javascripts/schedule.js +++ b/public/javascripts/schedule.js @@ -46,7 +46,11 @@ self._handleError = function (event) { self._getURLOfUsers = function (week, type, index) { const id = index + 1 - return '//' + window.location.host + '/meetingpointProxy/Roosters-AL%2Fdoc%2Fdagroosters%2F' + + const meetingpointProxyUrl = process.env.SCHOOL_LEVEL === 'mavo' + ? '/meetingpointProxy/Roosters-AL%2FTOSweb%2Fdagroosters%2F' + : '/meetingpointProxy/Roosters-AL%2Fdoc%2Fdagroosters%2F' + + return '//' + window.location.host + meetingpointProxyUrl + leftPad(week, 2, '0') + '%2F' + type + '%2F' + type + leftPad(id, 5, '0') + '.htm' } |