liqd/adhocracy — pull request #555 by xi (2013-09-11 23:14:48+00:00)
Title: Feature 553 link to overlays

This implements #553 (link to overlays).

Overlay state is encoded in the url via the query parameters `overlay_path` (which is relative to the domain) and `overlay_target` (a selector specifying the overlay to use, typically `#overlay-default` or `#overlay-big`).

Whenever an url with those parameters set is accessed the overlay is displayed.
Whenever an overlay loads it modifies the address bar so people can just copy and paste that url.

This approach still has some limitations:

- The back button already worked well when navigating inside iframes even before this PR. However opening and closing overlays does currently not work.
- The address bar is only updated on load events inside the iframe. `history.pushState` is not supported yet
- IE9 does not support history api

**Please note that the final commit is not yet finished. However I would already like to get feedback on the rest of the code as the final bit is not necessary for it to run**