Nitrogen Elements is a collection of useful Web UI controls and supposed to be used as an extention to Nitrogen Web Framework. Most of the controls in the library are implemented as Nitrogen wrappers to corresponding jQuery UI widgets.
- Action Dialog
- Accordion
- Tabs
- Menu
- Menubar
- jsGrid
- Progressbar
- Layout
- clone / build rebar from here: https://github.com/basho/rebar
- include nitrogen_elements dependency to your rebar.config
- clone the project from https://github.com/RomanShestakov/nitrogen_elements.git
- or include "Nitrogen Elements" as dependency for your project in rebar.config
e.g.:
{deps, [
{nitrogen_elements, ".*", {git, "[email protected]:RomanShestakov/nitrogen_elements.git", "HEAD"}}
]}.
- add nitrogen_elements.hrl to your modules:
-include_lib("nitrogen_elements/include/nitrogen_elements.hrl").
- Please notice that your html template need to include the following references to css and javascript libs:
<link rel='stylesheet' href='plugins/jquery-ui/css/jquery-ui-1.10.0.custom.min.css' type='text/css' media='screen' charset='utf-8'>
<script src='/plugins/jquery-ui/js/jquery-ui-1.10.0.custom.min.js' type='text/javascript' charset='utf-8'></script>
<script src='/plugins/history/html4_html5/jquery.history.js' type='text/javascript' charset='utf-8'></script>
<script src='/plugins/history/history_helper.js' type='text/javascript' charset='utf-8'></script>
<script src='/plugins/jqgrid/js/i18n/grid.locale-en.js' type='text/javascript'></script>
<script type="text/javascript"> jQuery.jgrid.no_legacy_api = true; </script>
<script src='/plugins/jqgrid/js/jquery.jqGrid.min.js' type='text/javascript'></script>
<script src='/plugins/layout/js/jquery.layout-latest.min.js' type='text/javascript'></script>
<script src='/plugins/menubar/jquery.ui.menubar.js' type='text/javascript' charset='utf-8'></script>
see for example priv/templates/onecolumn.html from Nitrogen_Elements_Example project.
The best way to get familiar with Nitrogen_Elements is to clone Nitrogen_Elements_Example project which shows practical usage :
- git clone https://github.com/RomanShestakov/nitrogen_elements_examples.git
- cd nitrogen_elements_examples;make
- ./start.sh
- in browser go to locahost:8000