Sha256: e8b5840071cb87937aea4966452eed1d7c541c5008791d40a0c3a7b77f23f59f
Contents?: true
Size: 747 Bytes
Versions: 42
Compression:
Stored size: 747 Bytes
Contents
class Para.TurbolinksLoading start: => @addLoadingMarkup() stop: => @removeLoadingMarkup() addLoadingMarkup: -> $('<div/>', class: 'loading-overlay', 'data-loading-overlay': true) .prependTo('body') $('<div/>', class: 'loading-spinner', 'data-loading-spinner': true) .prependTo('body') removeLoadingMarkup: -> $('[data-loading-overlay]').remove() $('[data-loading-spinner]').remove() # Global loading manager allowing to Para.loadingManager = new Para.TurbolinksLoading() $(document).on('page:fetch', Para.loadingManager.start) $(document).on 'page:change turbolinks:load', -> Para.loadingManager.stop() $('body').on('submit', '[data-para-form]:not([data-remote])', Para.loadingManager.start)
Version data entries
42 entries across 42 versions & 1 rubygems