Grid
container
Add responsive Rows
container
Add responsive Rows
Example | Col2 Col4 Col6 |
HTML code | <DIV class="row"> <DIV class="col col-md-2">Col2</DIV> <DIV class="col bg-gray col-md-4">Col4</DIV> <DIV class="col col-md-5">Col6</DIV> </DIV> |
Type | organism |
Group | container |
Elements | row |
Documentation | Set grid parameters to grid and add rows/cols through them. |
Wrapper to use element through Javascript
Methods |
|
||||||||||||||||
Code example | Basicvar $Grid = cms.get('ui', 'grid'); // @todo What are basic use parameters?? $Grid.addRow('Label', 'Input'); // Argumetns are cols data $Grid.addRow('Label', ['Input', 'infoTxt']); // Col data can be also a list var $Row = $Grid.newRow(); var $Col = $Row.newCol(); $Grid.newRow() .addCol(2, 'Col content') .addCol(10, 'Col content'); All parametersvar $Grid = cms.get('ui', 'grid', { row: { }, // All ui.row parametrit! }); $Row = $Grid.addRow('Label', 'Input'); $Row = $Grid.addRow('Label'[, 'Input', 'infoTxt']); Chainedvar $Grid = cms.get('ui', 'grid').appendTo( $DIV ) .newRow() .addCol( 4 , cms.get('ui', 'label', 'Eräpäivä') ) // @todo lang .addCol( 8 , cms.get('field', 'date').input({ name: 'due_date', id: 'todo_due_date_'+Todo.id, value: Todo.due_date }) ) $Grid.newRow() .addCol( 'md-4 xs-6' , cms.get('ui', 'switch', { name: 'status', value: Do.parseInt(Todo.status), options: [1,10], label: cms.get('lang','fieldtype/todo/status/done') }) ); |
Elements Css style
bordered | < class='grid bordered'>Bordered{tag}> Add borders arois all cols. |
condensed | < class='grid condensed'>Condensed{tag}> Remove all margins and paddings |
justified | < class='grid justified'>Justified{tag}> Remove main margins and paddings |
padding | < class='grid padding'>Padding{tag}> Make vertical space (grid+col, top+bottom) |