summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/schedules.js12
-rw-r--r--www/schedules.html1
2 files changed, 13 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();
}
diff --git a/www/schedules.html b/www/schedules.html
index 0708c29..8e47b66 100644
--- a/www/schedules.html
+++ b/www/schedules.html
@@ -19,6 +19,7 @@
<div id="control">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" id="btn-earlier"><span class="glyphicon glyphicon-minus"></span></button>
+ <button type="button" class="btn btn-default" id="btn-today"><span class="glyphicon glyphicon-record"></span></button>
<button type="button" class="btn btn-default" id="btn-later"><span class="glyphicon glyphicon-plus"></span></button>
</div>
</div>