Sha256: 363329ca7232470827b0261da105eb04facfd7a92bb48099a0d4bc357d248264
Contents?: true
Size: 634 Bytes
Versions: 14
Compression:
Stored size: 634 Bytes
Contents
class ActiveAdmin.PerPage constructor: (@options, @element)-> @$element = $(@element) @_init() @_bind() _init: -> @$params = @_queryParams() _bind: -> @$element.change => @$params['per_page'] = @$element.val() delete @$params['page'] location.search = $.param(@$params) _queryParams: -> query = window.location.search.substring(1) params = {} re = /([^&=]+)=([^&]*)/g while m = re.exec(query) params[decodeURIComponent(m[1])] = decodeURIComponent(m[2]) params $.widget.bridge 'perPage', ActiveAdmin.PerPage $ -> $('.pagination_per_page select').perPage()
Version data entries
14 entries across 14 versions & 2 rubygems