This page describes how to apply and use LiU's O365-layout in an application running outside of our instance of Office365, but where we want the same look and feel.
There are three alternatives on how to use this template.
If you dont care about bootstrap or jquery version, just want the latest stable anyway. Add this within the head-tag.
<link rel="stylesheet" href="//www.liu.se/mallar/o365bs/latest.css" type="text/css"/> <script type="text/javascript" src="//www.liu.se/mallar/jquery/jquery.min.js"></script> <script type="text/javascript" src="//www.liu.se/mallar/o365bs/bootstrap.min.js"></script> <script type="text/javascript" src="//www.liu.se/mallar/o365bs/o365.js"></script>
Note: This loads relevant stylesheets and scripts for bootstrap to work. You don't need to load them yourself.
Note: The lastest.css-file must be loaded after other css-files you might load. Generally avoid having local css-files unless you have very special elements on your page. If you need style on something first check if it can be included in the central css-file.>
Example. (within the head-tag)
<link rel="stylesheet" href="//www.liu.se/mallar/o365bs/bootstrap-3.1.1/css/bootstrap.min.css" type="text/css"/> <link rel="stylesheet" href="//www.liu.se/mallar/o365bs/bootstrap-3.1.1/css/bootstrap-theme.min.css" type="text/css"/> <link rel="stylesheet" href="//www.liu.se/mallar/o365bs/o365v2.css" type="text/css"/> <script type="text/javascript" src="//www.liu.se/mallar/jquery/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="//www.liu.se/mallar/o365bs/bootstrap-3.1.1/js/bootstrap.min.js"></script> <script type="text/javascript" src="//www.liu.se/mallar/o365bs/o365.js"></script>
Note: css-files must be loaded in order.
Submit/Cancel/etc-buttons, both at top and bottom fo form. Use the htmlcode (with bootstrap-classes) below to get right-aligned images with correct layout.
<div class="form-group"> <div class="col-sm-12 text-right"> <input type="submit" value="Save" class="btn btn-primary"> <input type="button" value="Cancel" class="btn btn-default"> </div> </div>
If you want to make more advanced things you should learn the bootstrap grid system.
The buttons should be right aligned with the fields.
See form example and view source to see the source for some examples.
If there are many fields if the form and you want to group them you use <fieldset>
-tags.
If you add a <legend>
within the <fieldset>
is it displayed as a "header"
Add the class liuCollapse
to the <fieldset>
in order to enable the user to toggle visibility by clicking on the legend.
Also add the class liuCollapsed
to the <fieldset>
to make the fieldset intially collapsed.