Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
This needs tests
  • Loading branch information
pikesley committed Feb 16, 2016
1 parent d4903cf commit 1629c21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/charts/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
tickcolor: '#f00'
},*/
autosize: false,
height: 500,
height: 450,
width: 380,
margin: {
l: 50, r: 40, t: 20
Expand Down
7 changes: 6 additions & 1 deletion app/views/shared/_hours_slider.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
$('#legend').text(period(getParam('hours')))

function getParam(sParam) {
param = undefined
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam) {
return sParameterName[1];
param = sParameterName[1];
}
if(param === undefined) {
return 72
}
return param
}
}

Expand Down

0 comments on commit 1629c21

Please sign in to comment.