diff --git a/app/javascript/legacy/pagination.coffee b/app/javascript/legacy/pagination.coffee deleted file mode 100644 index e45bb39f..00000000 --- a/app/javascript/legacy/pagination.coffee +++ /dev/null @@ -1,16 +0,0 @@ -$(document).on 'ready turbo:load', -> - if $('#pagination').length > 0 - $('#pagination').hide() - loading_posts = false - - $('#load-more-btn').show().click -> - unless loading_posts - loading_posts = true - more_posts_url = $('#pagination .pagination .next a').attr('href') - $this = $(this) - $this.html('').addClass('disabled') - $.getScript more_posts_url, -> - $this.text('Load more').removeClass('disabled') if $this - loading_posts = false - $('[data-toggle="tooltip"]').tooltip() - return diff --git a/app/javascript/packs/legacy.coffee b/app/javascript/packs/legacy.coffee index 05e3807e..27076844 100644 --- a/app/javascript/packs/legacy.coffee +++ b/app/javascript/packs/legacy.coffee @@ -5,11 +5,9 @@ import '../legacy/jquery' import 'popper.js' import 'bootstrap' -import '../legacy/pagination' - _ready = -> $('[data-toggle="tooltip"]').tooltip() $('.dropdown-toggle').dropdown() $(document).ready _ready -$(document).on 'turbo:load', _ready \ No newline at end of file +$(document).on 'turbo:load', _ready diff --git a/app/views/shared/_cursored_pagination_dummy.haml b/app/views/shared/_cursored_pagination_dummy.haml deleted file mode 100644 index 5f0571e8..00000000 --- a/app/views/shared/_cursored_pagination_dummy.haml +++ /dev/null @@ -1,11 +0,0 @@ --# this renders a pagination html to keep compatibility with the current pagination js - it _should_ be replaced with something else entirely later on. -- permitted_params ||= [] -#pagination - %ul.pagination - %li.next{ class: more_data_available ? nil : :disabled } - - if more_data_available - %a{ rel: :next, href: url_for(params.permit(*permitted_params).merge(last_id: last_id)) } - Next page - - else - Next page