Skip to content
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

Redirecting to Maps index after Annotation created #82

Open
keithnewman14 opened this issue Aug 14, 2012 · 0 comments
Open

Redirecting to Maps index after Annotation created #82

keithnewman14 opened this issue Aug 14, 2012 · 0 comments

Comments

@keithnewman14
Copy link
Member

Currently, for the experiment branch, I am redirecting the user to the Maps index view with the follow code:

$("#modal-annotation").on('submit', function(){
    window.location = '../maps'
  });

It's probably better to handle this in the Annotations Controller, but I was running into a bunch of problems because the action of saving the annotation occurs in the modal, so a standard redirect_to doesn't seem to work. This also seems to cause a minor bug with the :disable_with attribute for the submit button where it doesn't change to the disabled view until you press it a second time (though it works the first time and only submits the data once).

Could be something worth fixing up for the experiment branch, though it is only necessary for the experiment, so it also might not be worth spending too much time on.

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

No branches or pull requests

1 participant