aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/schedule.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-12-16 13:57:57 +0100
committerNoah Loomans <noahloomans@gmail.com>2016-12-16 13:57:57 +0100
commit31be7d12b8c9b1a2ad163e65808a28656adfbb45 (patch)
tree55a8d9d2e3e07e658a8d7a85be4926ba0ce75beb /public/javascripts/schedule.js
parentb6542a78c14b3d2e350b6620272a88094abda1c1 (diff)
add ability to scroll week selector away
Diffstat (limited to 'public/javascripts/schedule.js')
-rw-r--r--public/javascripts/schedule.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/public/javascripts/schedule.js b/public/javascripts/schedule.js
index 72171c6..e93ecf8 100644
--- a/public/javascripts/schedule.js
+++ b/public/javascripts/schedule.js
@@ -1,7 +1,8 @@
+const EventEmitter = require('events')
const leftPad = require('left-pad')
const search = require('./search')
-const self = {}
+const self = new EventEmitter()
self._nodes = {
schedule: document.querySelector('#schedule')
@@ -23,6 +24,7 @@ self._handleLoad = function (event) {
const document = self._parseMeetingpointHTML(request.response)
self._nodes.schedule.appendChild(document)
self._nodes.schedule.classList.remove('error')
+ self.emit('load')
}
self._handleError = function (event) {
@@ -35,6 +37,7 @@ self._handleError = function (event) {
}
self._nodes.schedule.textContent = error
self._nodes.schedule.classList.add('error')
+ self.emit('load')
}
self._getURLOfUsers = function (week, type, index) {