mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
fix events pagniation
This commit is contained in:
parent
e36df94f0f
commit
5a0bb86394
@ -36,7 +36,7 @@ Application.Controllers.controller "EventsController", ["$scope", "$state", 'Eve
|
||||
$scope.loadMoreEvents = ->
|
||||
Event.query Object.assign({page: $scope.page}, $scope.filters), (data) ->
|
||||
$scope.events = $scope.events.concat data
|
||||
groupEvents(data)
|
||||
groupEvents($scope.events)
|
||||
$scope.page += 1
|
||||
|
||||
if (!data[0] || data[0].nb_total_events <= $scope.events.length)
|
||||
|
@ -1,4 +1,4 @@
|
||||
total = @events.count
|
||||
total = @events.except(:offset, :limit, :order).count
|
||||
|
||||
json.cache! [@events, @page] do
|
||||
json.array!(@events) do |event|
|
||||
|
Loading…
Reference in New Issue
Block a user