From f05abed6ef7778be9c2b5385f9390b4644bb8fd3 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 4 Sep 2022 14:34:40 +0200 Subject: [PATCH] Rename `turbolinks:load` event to `turbo:load` --- app/javascript/legacy/pagination.coffee | 2 +- app/javascript/packs/application.ts | 8 ++++---- app/javascript/packs/legacy.coffee | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/javascript/legacy/pagination.coffee b/app/javascript/legacy/pagination.coffee index 1b710459..e45bb39f 100644 --- a/app/javascript/legacy/pagination.coffee +++ b/app/javascript/legacy/pagination.coffee @@ -1,4 +1,4 @@ -$(document).on 'ready turbolinks:load', -> +$(document).on 'ready turbo:load', -> if $('#pagination').length > 0 $('#pagination').hide() loading_posts = false diff --git a/app/javascript/packs/application.ts b/app/javascript/packs/application.ts index 8236bff5..7b6b73c1 100644 --- a/app/javascript/packs/application.ts +++ b/app/javascript/packs/application.ts @@ -18,12 +18,12 @@ start(); document.addEventListener('DOMContentLoaded', initAnswerbox); document.addEventListener('DOMContentLoaded', initInbox); document.addEventListener('DOMContentLoaded', initUser); -document.addEventListener('turbolinks:load', initSettings); +document.addEventListener('turbo:load', initSettings); document.addEventListener('DOMContentLoaded', initLists); document.addEventListener('DOMContentLoaded', initQuestionbox); document.addEventListener('DOMContentLoaded', initQuestion); document.addEventListener('DOMContentLoaded', initModeration); document.addEventListener('DOMContentLoaded', initMemes); -document.addEventListener('turbolinks:load', initAnnouncements); -document.addEventListener('turbolinks:load', initLocales); -document.addEventListener('turbolinks:load', initFront); \ No newline at end of file +document.addEventListener('turbo:load', initAnnouncements); +document.addEventListener('turbo:load', initLocales); +document.addEventListener('turbo:load', initFront); \ No newline at end of file diff --git a/app/javascript/packs/legacy.coffee b/app/javascript/packs/legacy.coffee index 2fb886eb..05e3807e 100644 --- a/app/javascript/packs/legacy.coffee +++ b/app/javascript/packs/legacy.coffee @@ -12,4 +12,4 @@ _ready = -> $('.dropdown-toggle').dropdown() $(document).ready _ready -$(document).on 'turbolinks:load', _ready \ No newline at end of file +$(document).on 'turbo:load', _ready \ No newline at end of file