better connection close handling

Depending on how the webapp was started up and whether the user clicked on
any links in it, window.close() may be disallowed by browser security
policy. Also if that fails, display a modal dialog that nicely blackens out
the webapp.

TODO: avoid Escape closing it. Bootstrap's docs are unclear about how to do
that.
This commit is contained in:
Joey Hess 2012-07-30 14:50:32 -04:00
parent a994130843
commit 78b3dada5b
4 changed files with 224 additions and 7 deletions

View file

@ -115,6 +115,7 @@ instance Yesod WebApp where
addStylesheet $ StaticR css_bootstrap_responsive_css
addScript $ StaticR jquery_full_js
addScript $ StaticR js_bootstrap_dropdown_js
addScript $ StaticR js_bootstrap_modal_js
$(widgetFile "page")
hamletToRepHtml $(hamletFile $ hamletTemplate "bootstrap")