Skip to content

Commit d656bd8

Browse files
committed
Chore: Migrate Tubolinks to Turbo
Trubolinks has been replaced by Turbo. The Turbolinks library has been achieved. Resolves #2952
1 parent 918df9d commit d656bd8

File tree

66 files changed

+134
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+134
-88
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ gem 'sprockets-rails'
5353
gem 'telegraf'
5454
gem 'terser', require: false
5555
gem 'tubesock', github: 'openhpi/tubesock'
56-
gem 'turbolinks'
56+
gem 'turbo-rails'
5757
gem 'webauthn'
5858
gem 'zxcvbn-ruby', require: 'zxcvbn'
5959

Gemfile.lock

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,6 @@ GEM
617617
turbo-rails (2.0.13)
618618
actionpack (>= 7.1.0)
619619
railties (>= 7.1.0)
620-
turbolinks (5.2.1)
621-
turbolinks-source (~> 5.2)
622-
turbolinks-source (5.2.0)
623620
tzinfo (2.0.6)
624621
concurrent-ruby (~> 1.0)
625622
unicode-display_width (3.1.4)
@@ -749,7 +746,7 @@ DEPENDENCIES
749746
telegraf
750747
terser
751748
tubesock!
752-
turbolinks
749+
turbo-rails
753750
web-console
754751
webauthn
755752
webmock
@@ -992,8 +989,6 @@ CHECKSUMS
992989
tpm-key_attestation (0.14.0) sha256=d05cc52b397f89c36a7307407e0e84d3ea1c7afce50e0a70b146f8ab17d2bf4b
993990
tubesock (0.2.9)
994991
turbo-rails (2.0.13) sha256=c40ac0a3ccd57c129925c8ac524a5dfd1e17fad080906e2d32135721a8bba22f
995-
turbolinks (5.2.1) sha256=5fea5889c4e2a78a5bd9abda3860c565342b50c6e2593697d5558a08e15cce9c
996-
turbolinks-source (5.2.0) sha256=362a41fa851a22b0f15cf8f944b6c7c5788f645dc1f61ae25478bb25c3bc85d4
997992
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
998993
unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1
999994
unicode-emoji (4.0.4) sha256=2c2c4ef7f353e5809497126285a50b23056cc6e61b64433764a35eff6c36532a

app/assets/javascripts/application.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13-
//= require turbolinks
1413
//= require rails-timeago
1514
//= require locales/jquery.timeago.de.js
1615
//

app/assets/javascripts/base.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Array.prototype.includes = function(element) {
44

55
window.CodeOcean = {
66
refresh: function() {
7-
Turbolinks.visit(window.location.pathname);
7+
Turbo.visit(window.location.pathname);
88
}
99
};
1010

@@ -24,7 +24,7 @@ $.fn.scrollTo = function(selector) {
2424
}, ANIMATION_DURATION);
2525
};
2626

27-
$(document).on('turbolinks:load', function() {
27+
$(document).on('turbo:load', function() {
2828
// Update all CSRF tokens on the page to reduce InvalidAuthenticityToken errors
2929
// See https://github.com/rails/jquery-ujs/issues/456 for details
3030
$.rails.refreshCSRFTokens();
@@ -66,9 +66,6 @@ $(document).on('turbolinks:load', function() {
6666
});
6767
}
6868

69-
// Enable all tooltips
70-
$('[data-bs-toggle="tooltip"]').tooltip();
71-
7269
// Enable sorttable again, as it is disabled otherwise by Turbolinks
7370
if (sorttable) {
7471
sorttable.init.done = false;

app/assets/javascripts/bootstrap-dropdown-submenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22

33
var subMenusSelector = 'ul.dropdown-menu [data-bs-toggle=dropdown]';
44

app/assets/javascripts/channels/la_exercises.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if ($.isController('exercises') && $('.teacher_dashboard').isPresent()) {
33

44
const exercise_id = $('.teacher_dashboard').data().exerciseId;

app/assets/javascripts/channels/pg_matching_channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22

33
if ($.isController('programming_groups') && window.location.pathname.includes('programming_groups/new')) {
44
const matching_page = $('#matching');

app/assets/javascripts/channels/synchronized_editor_channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function () {
1+
$(document).on('turbo:load', function () {
22

33
if (window.location.pathname.includes('/implement')) {
44
var editor = $('#editor');

app/assets/javascripts/codeharbor_link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22
if($.isController('codeharbor_links')) {
33
if ($('.edit_codeharbor_link, .new_codeharbor_link').isPresent()) {
44

app/assets/javascripts/community_solution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$(document).on('turbolinks:load', function() {
1+
$(document).on('turbo:load', function() {
22

33
if ($.isController('community_solutions') && $('#community-solution-editor').isPresent()) {
44
CodeOceanEditor.sendEvents = false;

0 commit comments

Comments
 (0)