Sha256: fa0a761dc1cad048aaf30f16b5c89d9e446f0ef81cf71ac8d9acf2c986a99fd4
Contents?: true
Size: 986 Bytes
Versions: 13
Compression:
Stored size: 986 Bytes
Contents
$ -> $('.pjax, .pagination a, .pjax_links a').live 'click', (event) -> if event.which > 1 || event.metaKey || event.ctrlKey return else if $.support.pjax event.preventDefault() $.pjax container: $(this).data('pjax-container') || '[data-pjax-container]' url: $(this).data('href') || $(this).attr('href') timeout: 50000 else if $(this).data('href') event.preventDefault() window.location = $(this).data('href') unless gon.test $('.pjax-form').live 'submit', (event) -> $el = $(this) if $.support.pjax event.preventDefault() $.pjax type: $el.attr('method') container: $el.data('pjax-container') || '[data-pjax-container]' url: this.action + (if (this.action.indexOf('?') != -1) then '&' else '?') + $el.serialize() timeout: 50000 $(document) .on 'pjax:start', -> $('#loading').show() .on 'pjax:end', -> $('#loading').hide()
Version data entries
13 entries across 13 versions & 1 rubygems