Important pagination correction
This commit is contained in:
parent
cd8e7eea9a
commit
449e0e191d
@ -1,10 +1,15 @@
|
|||||||
# Automatic ajax pagination
|
# Automatic ajax pagination
|
||||||
|
|
||||||
|
# To not setup pagination twice
|
||||||
|
pager = true
|
||||||
$(document).ready ->
|
$(document).ready ->
|
||||||
$('.pagination .next a')
|
$('.pagination .next a')
|
||||||
.attr('data-remote', true)
|
.attr('data-remote', true)
|
||||||
.click ->
|
.click ->
|
||||||
$('#loading').fadeIn()
|
$('#loading').fadeIn()
|
||||||
|
|
||||||
|
if pager
|
||||||
|
pager = false
|
||||||
$(document).on 'ajax:success', '.pagination .next a', (event, data, status, xhr) ->
|
$(document).on 'ajax:success', '.pagination .next a', (event, data, status, xhr) ->
|
||||||
$('#loading').fadeOut()
|
$('#loading').fadeOut()
|
||||||
elts = $('tbody tr', data)
|
elts = $('tbody tr', data)
|
||||||
|
Loading…
Reference in New Issue
Block a user