control-freak-ide/Control-Freak-Documentation/daux/admin-theme/documentation/grid.html
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

190 lines
11 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
<title>Light Blue Documentation</title>
<link href="css/documentation.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<meta charset="utf-8">
</head>
<body class="background-two">
<nav id="sidebar" class="sidebar">
<ul id="side-nav" class="side-nav">
<li class="green">
<a href="index.html"><i class=" icon-desktop"></i> <span class="name">Dashboard</span></a>
</li>
<li class="teal accordion-group">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#side-nav" href="#stats-collapse"><i class=" icon-bar-chart"></i> <span class="name">Statistics</span></a>
<ul id="stats-collapse" class="accordion-body collapse">
<li><a href="stat_statistics.html">Stats</a></li>
<li><a href="stat_charts.html">Charts</a></li>
<li><a href="stat_realtime.html">Realtime</a></li>
</ul>
</li>
<li class="blue accordion-group">
<a class="accordion-toggle collapsed" data-toggle="collapse"
data-parent="#side-nav" href="#forms-collapse"><i class=" icon-edit"></i> <span class="name">Forms</span></a>
<ul id="forms-collapse" class="accordion-body collapse">
<li><a href="form_account.html">Account</a></li>
<li><a href="form_article.html">Article</a></li>
<li><a href="form_elements.html">Elements</a></li>
<li><a href="form_validation.html">Validation</a></li>
<li><a href="form_wizard.html">Wizard</a></li>
</ul>
</li>
<li class="brown accordion-group">
<a class="accordion-toggle collapsed" data-toggle="collapse"
data-parent="#side-nav" href="#ui-collapse"><i class=" icon-magic"></i> <span class="name">UI</span></a>
<ul id="ui-collapse" class="accordion-body collapse">
<li><a href="ui_buttons.html">Buttons</a></li>
<li><a href="ui_dialogs.html">Dialogs</a></li>
<li><a href="ui_notifications.html">Notifications</a></li>
<li><a href="ui_icons.html">Icons</a></li>
<li><a href="ui_tabs.html">Tabs</a></li>
<li><a href="ui_accordion.html">Accordion</a></li>
</ul>
</li>
<li class="dark-red accordion-group">
<a class="accordion-toggle collapsed" data-toggle="collapse"
data-parent="#side-nav" href="#components-collapse"><i class=" icon-bookmark-empty"></i> <span class="name">Components</span></a>
<ul id="components-collapse" class="accordion-body collapse">
<li><a href="component_calendar.html">Calendar</a></li>
<li><a href="component_maps.html">Maps</a></li>
<li><a href="component_gallery.html">Gallery</a></li>
<li><a href="component_fileupload.html">Fileupload</a></li>
</ul>
</li>
<li class="red accordion-group">
<a class="accordion-toggle collapsed" data-toggle="collapse"
data-parent="#side-nav" href="#tables-collapse"><i class=" icon-table"></i> <span class="name">Tables</span></a>
<ul id="tables-collapse" class="accordion-body collapse">
<li><a href="tables_static.html">Static</a></li>
<li><a href="tables_dynamic.html">Dynamic</a></li>
</ul>
</li>
<li class="active orange">
<a href="grid.html"><i class=" icon-columns"></i><span class="name">Widgets &nbsp; <span class="label label-info">new</span></span></a>
</li>
<li class="lime accordion-group">
<a class="accordion-toggle collapsed" data-toggle="collapse"
data-parent="#side-nav" href="#special-collapse"><i class=" icon-asterisk"></i> <span class="name">Special</span></a>
<ul id="special-collapse" class="accordion-body collapse">
<li><a href="special_search.html">Search</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="special_404.html">404</a></li>
</ul>
</li>
</ul>
</nav>
<div class="wrap">
<header class="page-header">
<h1>Documentation</h1>
</header>
<div class="content container-fluid">
<div class="row-fluid">
<div class="span10 offset1">
<section class="widget">
<h2>Grid System</h2>
<p><strong>Light Blue</strong> inherits 12-column grid system from
<a href="http://getbootstrap.com/css/#grid">Bootstrap's great one</a>.</p>
<p>Sometimes this behaviour has to be omitted, so you can add <code>.col-xs-*</code>
classes to your columns. Columns within this row will always remain their relative size.</p>
<h2>Widgets</h2>
<p>Light Blue widget looks simple and may contain three parts: header, body and footer. But any of them
can be omitted. So the basic widget structure looks like:</p>
<pre>&lt;section class="widget"&gt;
&lt;header&gt;
&lt;h3&gt;Header&lt;/h3&gt;
&lt;/header&gt;
&lt;div class="body"&gt;
Body
&lt;/div&gt;
&lt;footer&gt;
Footer
&lt;/footer&gt;
&lt;/section&gt;</pre>
<p>You can color widget's background by adding light color class. For example
<code>.light-blue</code>.</p>
<p>Widget will take as much place as inner content needs, but you can control its size:
<code>.tiny</code>, <code>.normal</code>, <code>.large</code>, or <code>.xlarge</code>.</p>
<p>Consider using some <code>.offset*</code> for <code>.col-*</code> that holds widget.
Let background shine!</p>
<h2>Widget Controls</h2>
<p>Since version 2.1 Light Blue includes a custom jquery plugin called <strong>Widgster</strong> which provides an easy way to handle basic
widget functions like collapsing, closing, ajax-refreshing & fullsreening.</p>
<p>To apply all these features to your default widget you have to add appropriate links (or buttons) to it:</p>
<pre>&lt;section class="widget"&gt;
&lt;header&gt;
&lt;h3&gt;Header&lt;/h3&gt;
&lt;div class="widget-controls"&gt;
&lt;a data-widgster="load" href="#"&gt;Reload&lt;/a&gt;
&lt;a data-widgster="expand" href="#"&gt;Expand&lt;/a&gt;
&lt;a data-widgster="collapse" href="#"&gt;Collapse&lt;/a&gt;
&lt;a data-widgster="fullscreen" href="#"&gt;Fullscreen&lt;/a&gt;
&lt;a data-widgster="restore" href="#"&gt;Restore&lt;/a&gt;
&lt;a data-widgster="close" href="#"&gt;Close&lt;/a&gt;
&lt;/div&gt;
&lt;/header&gt;
&lt;div class="body"&gt;
Body
&lt;/div&gt;
&lt;/section&gt;</pre>
<p>In the example above links are put into a <code>.widget-controls</code> but you can put them wherever inside of widget.</p>
<p>Then widgster needs to be initialized via javascript:</p>
<pre><code>$('.widget').widgster();</code></pre>
<p>As you could guess <code>data-widgster</code> attribute defines widget action to be performed when link is clicked.</p>
<h3>Options</h3>
<ul style="list-style: disc; padding-left: 40px; margin-bottom: 10px">
<li><strong>collapsed</strong> - if true collapses widget after page load;</li>
<li><strong>fullscreened</strong> - if true fullscreens widget after page load;</li>
<li><strong>bodySelector</strong> - widget body selector. Used for loading and collapsing. Default is <code>.body</code>;</li>
<li><strong>load</strong> - an url to fetch widget body from. Default is <code>undefined</code>;</li>
<li><strong>showLoader</strong> - whether to show a loader when ajax refresh performed. Default is <code>true</code>;</li>
<li><strong>autoload</strong> - whether to automatically perform ajax refresh after page load. May be set to an integer value. If set, for example, to 2000 will refresh the widget every 2 seconds. Default is <code>false</code>;</li>
<li><strong>closePrompt(callback)</strong> - a function to be called when closing. Closing is
only performed when <code>callback</code> is called.</li>
</ul>
<p>Widgster accepts an object with options:</p>
<pre><code>$('.widget').widgster({
collapsed: true
});</code></pre>
<h3>Actions</h3>
<ul style="list-style: disc; padding-left: 40px; margin-bottom: 10px">
<li><strong>close</strong> - closes the widget;</li>
<li><strong>collapse</strong> - collapses (minimizes) the widget. An element holding this data
attribute will be hidden when widget gets expanded;</li>
<li><strong>expand</strong> - expands the widget. An element holding this data
attribute will be hidden when widget gets collapsed;</li>
<li><strong>fullscreen</strong> - fullscreens the widget. An element holding this data
attribute will be hidden when widget gets restored;</li>
<li><strong>restore</strong> - restores the widget back to its position. An element holding this data
attribute will be hidden when widget gets fullscreened;</li>
<li><strong>load</strong> - reloads widget content from the url provided with <code>data-widget-load</code> attribute.</li>
</ul>
<p>All actions may be called via js:</p>
<pre><code>$('.widget').widgster('close');</code></pre>
<h3>Events</h3>
<p>Each action fires both before and after event. Events have the same names as actions. Before event may be canceled.</p>
<p>For example, to make refresh button spin:</p>
<pre>$('.widget').on("load.widgster", function(){
$(this).find('[data-widgster="load"] > i').addClass('fa-spin')
}).on("loaded.widgster", function(){
$(this).find('[data-widgster="load"] > i').removeClass('fa-spin')
});</pre>
</section>
</div>
</div>
</div>
</div>
<!-- jquery and friends -->
<script src="js/jquery.1.9.0.min.js"> </script>
<script src="js/bootstrap-transition.js"></script>
<script src="js/bootstrap-collapse.js"></script>
</body>
</html>