Sha256: cb977246820a46cff1ec3ce615d51c90161dd0bb517db1a8cbb9aabda0244d8b
Contents?: true
Size: 720 Bytes
Versions: 16
Compression:
Stored size: 720 Bytes
Contents
Dashboard.PaginableControllerMixin = Ember.Mixin.create actions: refreshPageData: (page)-> query = $.extend(@get('model')['query'], { page: page }) @store.findQuery(@get('model').type, query).then (records)=> @set('model', records) gotoPage: (page) -> @send('refreshPageData', page) nextPage: -> current = @get('model.meta.page') or 1 @send('gotoPage', current + 1) unless current + 1 > @get('model.meta.total_pages') previousPage: -> current = @get('model.meta.page') or 2 @send('gotoPage', current - 1) lastPage: -> last = @get('model.meta.total_pages') or 1 @send('gotoPage', last) firstPage: -> @send('gotoPage', 1)
Version data entries
16 entries across 16 versions & 1 rubygems