Commit 538fbccf authored by Taddeüs Kroes's avatar Taddeüs Kroes

Added more selectable days to navbar

parent 7d75c877
......@@ -197,9 +197,11 @@ AppView = Backbone.View.extend(
@labelview = new ChannelLabelsView(app: @)
$('#beforeyesterday').click(-> Settings.set(day: -2))
$('#yesterday').click(-> Settings.set(day: -1))
$('#today').click(-> Settings.set(day: 0))
$('#tomorrow').click(-> Settings.set(day: 1))
$('#overmorrow').click(-> Settings.set(day: 2))
Channels.fetch()
@centerIndicator()
......@@ -233,7 +235,7 @@ AppView = Backbone.View.extend(
Channels.fetchPrograms(day)
@updateIndicator()
$('.navbar .active').removeClass('active')
$($('.navbar .navitem')[day + 1]).addClass('active')
$($('.navbar .navitem')[day + 2]).addClass('active')
moveTimeline: ->
if @$el.scrollTop() != @prevScrollTop
......
<?php
function getwday($day) {
$wdays = array('zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag',
'vrijdag', 'zaterdag');
return ucfirst($wdays[getdate(time() + $day * 24 * 60 * 60)['wday']]);
}
?>
<!doctype html>
<html>
<head>
......@@ -46,10 +53,14 @@
</div>
<div class="navbar">
<a href="javascript:void(0);" id="beforeyesterday"
class="navitem"><?php echo getwday(-2) ?></a>
<a href="javascript:void(0);" id="yesterday" class="navitem">Gisteren</a>
<a href="javascript:void(0);" id="today" class="navitem active">Vandaag</a>
<a href="javascript:void(0);" id="tomorrow" class="navitem">Morgen</a>
<a href="settings.html" class="navitem">Selecteer zenders</a>
<a href="javascript:void(0);" id="overmorrow"
class="navitem"><?php echo getwday(2) ?></a>
<a href="settings.php" class="navitem">Selecteer zenders</a>
</div>
<script src="lib/jquery-1.10.2.min.js" type="text/javascript"></script>
......
<?php
function getwday($day) {
$wdays = array('zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag',
'vrijdag', 'zaterdag');
return ucfirst($wdays[getdate(time() + $day * 24 * 60 * 60)['wday']]);
}
?>
<!doctype html>
<html>
<head>
......@@ -6,10 +13,14 @@
</head>
<body>
<div class="navbar">
<a href="javascript:void(0);" id="beforeyesterday"
class="navitem disabled"><?php echo getwday(-2) ?></a>
<a href="javascript:void(0);" id="yesterday" class="navitem disabled">Gisteren</a>
<a href="index.html" id="today" class="navitem">Vandaag</a>
<a href="index.php" id="today" class="navitem">Vandaag</a>
<a href="javascript:void(0);" id="tomorrow" class="navitem disabled">Morgen</a>
<a href="settings.html" class="navitem active">Selecteer zenders</a>
<a href="javascript:void(0);" id="overmorrow"
class="navitem disabled"><?php echo getwday(2) ?></a>
<a href="settings.php" class="navitem active">Selecteer zenders</a>
</div>
<form id="select-channels" class="select-channels">
......
......@@ -32,7 +32,7 @@ html, body
background-color: #1a1a1a
&.disabled
color: #676767
color: #666
cursor: default
.guide
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment