use Rails 4 turbolinks

This commit is contained in:
Lee Lawlor
2014-07-23 13:45:15 -04:00
parent 7a132477d0
commit 937d2eea47
25 changed files with 49 additions and 55 deletions

View File

@ -174,7 +174,7 @@
var options = '<%= options.gsub(/'/, "%27") if options %>';
$(document).ready(function() {
$(document).on('page:load ready', function() {
// set initial saved values
$.each((options.split('&amp;')), setupChartForm(<%= index %> ));
// draw initial chart with saved options

View File

@ -56,7 +56,7 @@
<script type="text/javascript">
$(document).ready(function() {
$(document).on('page:load ready', function() {
// if chrome/safari error occurs, reload page
if ($('#title0').val() == '60' && $('#color0').val() == '10') {
window.location.reload();

View File

@ -20,7 +20,7 @@
return Date.UTC(d.substring(0,4), d.substring(5,7)-1, d.substring(8,10), d.substring(11,13), d.substring(14,16), d.substring(17,19)) - (myOffset * 60000);
}
$(document).ready(function() {
$(document).on('page:load ready', function() {
// blank array for holding chart data
var chartData = [];
// variable for the local date in milliseconds