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( ...@@ -197,9 +197,11 @@ AppView = Backbone.View.extend(
@labelview = new ChannelLabelsView(app: @) @labelview = new ChannelLabelsView(app: @)
$('#beforeyesterday').click(-> Settings.set(day: -2))
$('#yesterday').click(-> Settings.set(day: -1)) $('#yesterday').click(-> Settings.set(day: -1))
$('#today').click(-> Settings.set(day: 0)) $('#today').click(-> Settings.set(day: 0))
$('#tomorrow').click(-> Settings.set(day: 1)) $('#tomorrow').click(-> Settings.set(day: 1))
$('#overmorrow').click(-> Settings.set(day: 2))
Channels.fetch() Channels.fetch()
@centerIndicator() @centerIndicator()
...@@ -233,7 +235,7 @@ AppView = Backbone.View.extend( ...@@ -233,7 +235,7 @@ AppView = Backbone.View.extend(
Channels.fetchPrograms(day) Channels.fetchPrograms(day)
@updateIndicator() @updateIndicator()
$('.navbar .active').removeClass('active') $('.navbar .active').removeClass('active')
$($('.navbar .navitem')[day + 1]).addClass('active') $($('.navbar .navitem')[day + 2]).addClass('active')
moveTimeline: -> moveTimeline: ->
if @$el.scrollTop() != @prevScrollTop 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> <!doctype html>
<html> <html>
<head> <head>
...@@ -46,10 +53,14 @@ ...@@ -46,10 +53,14 @@
</div> </div>
<div class="navbar"> <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="yesterday" class="navitem">Gisteren</a>
<a href="javascript:void(0);" id="today" class="navitem active">Vandaag</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="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> </div>
<script src="lib/jquery-1.10.2.min.js" type="text/javascript"></script> <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> <!doctype html>
<html> <html>
<head> <head>
...@@ -6,10 +13,14 @@ ...@@ -6,10 +13,14 @@
</head> </head>
<body> <body>
<div class="navbar"> <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="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="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> </div>
<form id="select-channels" class="select-channels"> <form id="select-channels" class="select-channels">
......
...@@ -32,7 +32,7 @@ html, body ...@@ -32,7 +32,7 @@ html, body
background-color: #1a1a1a background-color: #1a1a1a
&.disabled &.disabled
color: #676767 color: #666
cursor: default cursor: default
.guide .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