railsforcharity/spokenvote — pull request #49 by billsaysthis (2013-01-16 06:24:54+00:00)
Title: Proposal Detail Page jan11

Adds JS and Sass so support and improve buttons work logged in or not; if not, modal login is presented and (only) if login is successful is user presented respective form to complete action. This line of code probably needs refinement and TESTS (cc @stevemorris).

To accomplish the above, existing login form was mainly split out into new partial that is also called from modal and to support Ajax to Devise, the SessionsController was added.

To get better modal support, the bootstrap-modal (JS) plugin was added (I use this at work and am quite happy with it).

Javascript originally in the proposals/_show.html.haml partials was moved into a separate proposals.js file, though some utility functions were added in sites.js.