Remove legacy pagination
This commit is contained in:
parent
62b53d8740
commit
6ee96446dc
|
@ -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('<i class="fa fa-spinner fa-spin"></i>').addClass('disabled')
|
||||
$.getScript more_posts_url, ->
|
||||
$this.text('Load more').removeClass('disabled') if $this
|
||||
loading_posts = false
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
return
|
|
@ -5,8 +5,6 @@ import '../legacy/jquery'
|
|||
import 'popper.js'
|
||||
import 'bootstrap'
|
||||
|
||||
import '../legacy/pagination'
|
||||
|
||||
_ready = ->
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$('.dropdown-toggle').dropdown()
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue