camptocamp/cgxp — pull request #502 by ochriste (2013-06-20 14:33:09+00:00)
Title: retain map context after login/logout

this implement the new login behavior listed in the offer document from 14.06.2012 (MFUsergroup_geoportail_evolutions2013_v1.1.pdf)

#4 GARDER LE CONTEXTE DE LA CARTE APRÈS UN LOGIN

the way I detect if the url contains a permalink or not may not be the most error proof but it seems relatively safe and it is simple, this is of course open to suggestion if you have a simple yet safer way to do it.

another point is about the way the login previously refreshed the page after login "ok", I could not find any logical reason to use the form submit, so I replaced it by a simpler window.location.
If you know or remember why it was done that way, please let me know.

I took the opportunity to add an extra ignoreExistingPermalink parameter to allow more precise control on the behavior described in the job summary, which is pretty much of all or nothing and may be a bit limiting.