New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JavaScript #6

Merged
merged 6 commits into from Jul 31, 2017

Conversation

Projects
None yet
3 participants
@javan
Member

javan commented Jul 31, 2017

  • Fixes #4 by forcing full page loads when using Turbolinks
  • Fixes that submitting the hidden form would do a full POST request instead of a remote XHR
  • Hides the google_sign_in container until it's ready to be clicked
  • Freshens up the JavaScript and Google API client usage

@dhh dhh merged commit b971968 into master Jul 31, 2017

@dhh dhh deleted the improve-js branch Jul 31, 2017

@morgoth

This comment has been minimized.

Show comment
Hide comment
@morgoth

morgoth Aug 4, 2017

Contributor

@javan @dhh This breaks my integration.
When I sign in now, request is done with format: :js - previously it was :html which worked fine with simple redirect_to in the controller - now the page is not refreshed (not reloaded).

Changing

document.getElementById("google_sign_in_submit").click()

to document.getElementById("google_sign_in_submit").form.submit(); fixes it, which means it won't be a "remote" call anymore

I checked with app that uses turbolinks and with app that doesn't use it - the same problem.

Contributor

morgoth commented Aug 4, 2017

@javan @dhh This breaks my integration.
When I sign in now, request is done with format: :js - previously it was :html which worked fine with simple redirect_to in the controller - now the page is not refreshed (not reloaded).

Changing

document.getElementById("google_sign_in_submit").click()

to document.getElementById("google_sign_in_submit").form.submit(); fixes it, which means it won't be a "remote" call anymore

I checked with app that uses turbolinks and with app that doesn't use it - the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment