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

@ -3,7 +3,7 @@
<h4 class="breadcrumb"><%= t(:channels_my) %></h4>
<div class="col-pad">
<div class="col-pad" data-no-turbolink>
<% if @channels.length > 0 %>
@ -73,7 +73,7 @@
</div>
<script>
$(document).ready(function() {
$(document).on('page:load ready', function() {
$('.tablesorter').tablesorter();
});
</script>

View File

@ -36,7 +36,7 @@
<script>
// when the document is ready
$(document).ready(function() {
$(document).on('page:load ready', function() {
// when search tag is clicked
$('#search_tag').on('click', function() {

View File

@ -11,7 +11,7 @@
</style>
<script type="text/javascript">
$(document).ready(function() {
$(document).on('page:load ready', function() {
var html = '';
var field1, field2, field3, field4, field5, field6, field7, field8;
@ -56,7 +56,7 @@
setInterval(function() {
// get the data with a webservice call
$.getJSON('<%= "#{@domain}channels/#{params[:channel_id]}/feed/last.json?callback=?&offset=0&location=true&status=true" %>', function(data) {
$.getJSON('<%= "#{@domain}channels/#{params[:channel_id]}/feed/last.json?callback=?&offset=0&location=true&status=true" %>', function(data) {
// if data exists and entry id doesn't already exist
if (data.location && $('#entry_' + data.entry_id).length == 0) {
html = '<div id="entry_' + data.entry_id + '"><b><img src="<%= "#{@domain}images/icon_location_24.png" %>" width="24" height="24" border="0" align="absbottom" /> ' + data.location + '</b></div>';
@ -91,3 +91,4 @@
<div id="feed-container"></div>
</body>
</html>

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

View File

@ -6,12 +6,12 @@
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootswatch/3.1.1/cerulean/bootstrap.min.css" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" media="screen" rel="stylesheet" />
<%= stylesheet_link_tag 'application' %>
<%= stylesheet_link_tag 'application', "data-turbolinks-track" => true %>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type='text/javascript' src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<%= javascript_include_tag 'application' %>
<%= javascript_include_tag 'application', "data-turbolinks-track" => true %>
<%= csrf_meta_tag %>
<% if Rails.env == 'production' %>

View File

@ -15,7 +15,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 date string

View File

@ -1,6 +1,6 @@
<div class="col-sm-8 col-xs-8">
<ol class="breadcrumb">
<ol class="breadcrumb" data-no-turbolink>
<li><%= link_to t(:plugins), plugins_path %></li>
<li><%= link_to plugin_path(@plugin.id) do %> <%= t(:plugin) %> <%= @plugin.id %><% end %></li>
<li class="active"><%= t(:edit) %></li>