openmrs/openmrs-contrib-id — pull request #4 by elliottwilliams (2014-06-14 04:31:24+00:00)
Title: UI Updates: Dialog layout, {less} CSS, Bootstrap

As part of my work on the OAuth module and connectivity between OpenMRS ID and [Modulus][1], I've made a few modernizations and customizations to the UI and view-rendering components of OpenMRS ID.

- I broke up the monolithic `style.css` into multiple files written in [less][2], allowing for all the goodies that a pre-processed CSS language gets you, like mixins and nested selectors
- I separated `layout.ejs` into multiple layout components, now residing in the `views/layouts/` directory.
- I created a new layout template, `dialog.ejs`, which is a stripped-down version of the Dashboard UI and is suitable for display in popups or mobile browsers.
- I am including the Bootstrap library site-wide, and have replaced custom components and stylings where Bootstrap has a clear superior component. For example, buttons, dropdowns, and popovers are now Bootstrap components.
- I updated jQuery into the v2.x branch. This reduced compatibility with old IEs but is in line with other browser requirements in the OpenMRS community.
- I added two functions accessible from views: `script()` and `style()` which accept a single URL argument and load that URL as a stylesheet or script in the page's `

`. For example:

<% style('/resource/stylesheets/dialog.css') %>
<% script('/resource/scripts/omrsid.js') %>

That's it! @plypy, I ran a test merge with your latest code in the `new-db` branch and saw that there were not any significant conflicts, just a single-line difference in `signup.ejs` and `package.json`, so you shouldn't have any trouble integrating this work into yours once it's merged.

[1]: https://github.com/openmrs/openmrs-contrib-modulus
[2]: http://lesscss.org