joomla/joomla-cms — pull request #5087 by smanzi (2014-11-11 16:59:45+00:00)
Title: Fixes and extends JHtmlBootstrap::renderModal() (Fixes #5084)

This PR fixes errors in JHtmlBootstrap::renderModal() (see: #5084)

The functionality of the "backdrop" parameter is extended to accept the 'static' value, which genrates a backdrop the doesn't close the modal when clicked.

Two new parameters are introduced:
- closebtn boolean Display modal close button (default = true)
- animation boolean Fade in from the top of the page (default = true)

I'm also considering the possibility of removing or modifying the behaviour of the 'show' and 'remote' parameter: the former doesn't seems to be useful in our context (we always start with a hidden modal) and the latter I think it clashes with the way we inject code in the modal.

Further possible mods (to generate a more "standard bootstrap" code could be:
- eliminate the "-container" div
- move the footer outside of the "-body" div, into a "-footer" div
- inject the modal content not through JS but through the "data-remote" attribute

Todo: Should we keep the modal() function for BC or get rid of it? Should we flag it as deprecated?