activebridge / lazybox

Lazybox is a jQuery-based, simple, lightweight lightbox that can display entire remote pages, images and confirmation dialogs. Replace standard rails confirmations with lazybox just added several rows to your project.

Home Page:lazybox.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Turbolinks integration

oleg-voloshyn opened this issue · comments

It would be nice to have function that can be used to display loader.

I can use lazybox to display spinner on the pages where lazybox is not active.

$(document).on 'page:fetch', -> $.lazybox("<i class='fa fa-spinner fa-spin'>", { klass: 'spinner', close: false, esc: false })

But if I have form displayed in lazybox and I want to show loader after form submit what can I do?

Turbolinks.
If you displayed the form in lazybox you could add the data-disable-with attribute to submit button so users can see the request is sent.