diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/schedules.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/www/js/schedules.js b/www/js/schedules.js index d4aa8a2..327d19a 100644 --- a/www/js/schedules.js +++ b/www/js/schedules.js @@ -69,6 +69,13 @@ rh.ShowList.prototype.fetch = function() { }); }; +rh.ShowList.prototype.today = function() { + if(!this.request_sent) { + this.current = new Date(); + this.fetch(); + } +}; + rh.ShowList.prototype.prev = function() { if(!this.request_sent) { this.current = new Date(this.current.valueOf() - 24*3600*1000); @@ -196,10 +203,15 @@ function schedules_init() { shows = new rh.ShowList(d); showListView = new rh.ShowListView(shows); + $('#btn-today').click(schedules_today); $('#btn-earlier').click(schedules_prev); $('#btn-later').click(schedules_next); } +function schedules_today() { + shows.today(); +} + function schedules_prev() { shows.prev(); } |