ifad / data-confirm-modal

Makes Rails' link_to confirm: 'foo' build a Bootstrap Modal instead of calling the browser's confirm() API.
MIT License
271 stars 115 forks source link

Conditionally export as a module #54

Closed rylnd closed 6 years ago

rylnd commented 7 years ago

As mentioned in #53. There's a lot that could be done to make this better (e.g. auto-invocation unless you import a named part of the module, removing the dependence on jQuery, etc.), but I promised @vjt a PR so here's the next step!

rylnd commented 7 years ago

@vjt FYI I did not have an opportunity to test this in the browser so I can't verify that it's working as expected there. FWIW this did not end up serving my purposes because it relies on jquery-ujs and we're using plain old rails-ujs instead.

vjt commented 6 years ago

This looks very good, thanks. I am sorry for the delay in providing an update.

As reported by @cyberdeck, this code works with rails-ujs with the changes in #55.

vjt commented 6 years ago

Thanks for your help. I have reworked these changes and included them in #58.