aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/schedule.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-01-30 18:47:56 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-01-30 18:47:56 +0100
commit773584f251b753fb1172cf9b34aaa82ef809ea9d (patch)
tree3deb4f9fefb8545a8aa1f5acca317f35dd906b72 /public/javascripts/schedule.js
parent6edf8919a7ea9718405d3ccd0fed2e93ce1e54cc (diff)
Refactor long lines
Diffstat (limited to 'public/javascripts/schedule.js')
-rw-r--r--public/javascripts/schedule.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/public/javascripts/schedule.js b/public/javascripts/schedule.js
index a8e13c8..fa2c1b5 100644
--- a/public/javascripts/schedule.js
+++ b/public/javascripts/schedule.js
@@ -44,8 +44,10 @@ self._handleError = function (event) {
self._getURLOfUsers = function (week, type, index) {
const id = index + 1
- return '//' + window.location.host + '/meetingpointProxy/Roosters-AL%2Fdoc%2Fdagroosters%2F' +
- leftPad(week, 2, '0') + '%2F' + type + '%2F' + type + leftPad(id, 5, '0') + '.htm'
+ const meetingpointURL =
+ `Roosters-AL/doc/dagroosters/${leftPad(week, 2, '0')}/${type}/` +
+ `${type}${leftPad(id, 5, '0')}.htm`
+ return `/meetingpointProxy/${window.encodeURIComponent(meetingpointURL)}`
}
self._removeChilds = function () {
@@ -59,7 +61,8 @@ self.viewItem = function (week, selectedUser) {
self._removeChilds()
search.updateDom(selectedUser)
} else {
- const url = self._getURLOfUsers(week, selectedUser.type, selectedUser.index)
+ const url = self._getURLOfUsers(week, selectedUser.type,
+ selectedUser.index)
self._removeChilds()