Commit cb18cbd5 authored by Klaus Stein's avatar Klaus Stein
Browse files

(Hope-)fully replace all turbolinks with turbo

parent dd73ae20
......@@ -23,7 +23,7 @@ gem 'puma' #, '~> 5.0'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker' #, '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks' #, '~> 5'
# gem 'turbolinks' #, '~> 5'
# The new kid on the block:
gem 'turbo-rails'
......
......@@ -243,9 +243,6 @@ GEM
turbo-rails (1.0.1)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)
......@@ -301,7 +298,6 @@ DEPENDENCIES
sorcery
spring
turbo-rails
turbolinks
tzinfo-data
web-console (>= 4.1.0)
webdrivers
......
......@@ -27,7 +27,7 @@ import 'datatables.net-searchbuilder-dt/css/searchBuilder.dataTables.css';
//import 'datatables.net-select-dt/css/select.dataTables.css'
document.addEventListener("turbolinks:load", function(event) {
document.addEventListener("turbo:load", function(event) {
const elem = $("#maps-table");
const noorder_rows = elem.data("noorder");
window.xxx = noorder_rows;
......
......@@ -4,7 +4,7 @@ import 'leaflet-defaulticon-compatibility';
//
var bamberg = L.latLng(49.9, 10.9);
document.addEventListener("turbolinks:load", function(event) {
document.addEventListener("turbo:load", function(event) {
const mapdiv = document.getElementById('example-map');
if(!mapdiv) return; // Hm, wrong page?
var map = L.map(mapdiv,
......
......@@ -49,7 +49,7 @@ function mapWithImagemap(mapdiv) {
}
document.addEventListener("turbolinks:load", function(event) {
document.addEventListener("turbo:load", function(event) {
for(let mapdiv of document.querySelectorAll(".imagemap-map[data-image]")) {
mapWithImagemap(mapdiv);
}
......
......@@ -7,7 +7,7 @@ import "Leaflet.Deflate";
const bamberg = L.latLng(49.9, 10.9);
const placecolor = '#55665588';
document.addEventListener("turbolinks:load", function(event) {
document.addEventListener("turbo:load", function(event) {
const mapdiv = document.getElementById('overview-map');
if(!mapdiv) return; // Hm, wrong page?
const maps_url = mapdiv.dataset.mapsUrl;
......
......@@ -147,7 +147,7 @@ function mapWithPlace(mapdiv) {
}
}
document.addEventListener("turbolinks:load", function(event) {
document.addEventListener("turbo:load", function(event) {
for(let mapdiv of document.querySelectorAll(".place-map[data-geojsonurl]")) {
mapWithPlace(mapdiv);
}
......
import L from 'leaflet';
import 'leaflet-defaulticon-compatibility';
document.addEventListener("turbolinks:load", function(event) {
document.addEventListener("turbo:load", function(event) {
const mapdiv = document.getElementById('umm-map');
if(!mapdiv) return; // Hm, wrong page?
const europe_url = mapdiv.dataset.europeUrl;
......
......@@ -31,4 +31,4 @@
<%= form.submit %>
</div>
<% end %>
<% end %>
<% end %>
......@@ -6,8 +6,8 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbo-track': 'reload' %>
</head>
<body class="<%= yield(:cssclass).presence or 'default' %>">
......
Supports Markdown
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