Added column panel, refactored panel adding from rows to include panel specific parameters. Moved call to init function to template to avoid double init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<div ng-controller="column">
|
||||
<div class="row-fluid">
|
||||
<h4>Add Panel to Column</h4>
|
||||
<select class="input-medium" ng-model="new_panel.type" ng-options="f for f in _.without(config.modules,'column')| stringSort" ng-change="reset_panel(new_panel.type);send_render();"></select>
|
||||
<small>Select Type</small>
|
||||
<div ng-show="!(_.isUndefined(new_panel.type))">
|
||||
<div column-edit panel="new_panel" config="config" row="row" dashboards="dashboards" type="new_panel.type"></div>
|
||||
<button ng-click="add_panel(new_panel); reset_panel();" class="btn btn-primary">Create Panel</button><br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<h4>Panels</h4>
|
||||
<table class="table table-condensed table-striped">
|
||||
<thead>
|
||||
<th>Title</th>
|
||||
<th>Type</th>
|
||||
<th>Height</th>
|
||||
<th>Delete</th>
|
||||
<th>Move</th>
|
||||
</thead>
|
||||
<tr ng-repeat="app in panel.panels">
|
||||
<td>{{app.title}}</td>
|
||||
<td>{{app.type}}</td>
|
||||
<td><input type="text" class="input-small" ng-model="app.height"></input></td>
|
||||
<td><i ng-click="panel.panels = _.without(panel.panels,app)" class="pointer icon-remove"></i></td>
|
||||
<td><i ng-click="_.move(panel.panels,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
|
||||
<td><i ng-click="_.move(panel.panels,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user