aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/main.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-12-09 15:33:05 +0100
committerNoah Loomans <noahloomans@gmail.com>2016-12-09 15:33:05 +0100
commit907e8c138ae890208b03b23a420b32290fc2ef88 (patch)
tree27f9c8ecc0432554e8e648ad438c6d325bac7b6d /public/javascripts/main.js
parente18bf78dd0a0ab8b4a70da6e370faa1a1132e211 (diff)
switch to search fireing search event
instaid of calling schedule.viewItem himself
Diffstat (limited to 'public/javascripts/main.js')
-rw-r--r--public/javascripts/main.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js
index d242ce2..29f1d3e 100644
--- a/public/javascripts/main.js
+++ b/public/javascripts/main.js
@@ -1,6 +1,11 @@
const frontpage = require('./frontpage')
-require('./search')
+const search = require('./search')
+const schedule = require('./schedule')
frontpage.show()
+search.events.on('search', function (selectedItem) {
+ schedule.viewItem(0, selectedItem)
+})
+
document.body.style.opacity = 1