Added row editor

This commit is contained in:
Rashid Khan
2013-02-13 12:23:24 -07:00
parent 81962c831b
commit b162bd64ce
16 changed files with 113 additions and 39 deletions
+32 -6
View File
@@ -1,11 +1,9 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>{{row.title}} <small>editor</small></h3>
<h3>{{row.title}} <small>row editor</small></h3>
</div>
<div class="modal-body">
<h4>General</h4>
<h4>Row Control</h4>
<div class="row-fluid">
<div class="span4">
<label class="small">Title</label><input type="text" class="input-medium" ng-model='row.title'></input>
@@ -14,10 +12,38 @@
<label class="small">Height</label><input type="text" class="input-mini" ng-model='row.height'></input>
</div>
<div class="span1">
<label class="small"> Editable </label><input type="checkbox" ng-model="panel.editable" ng-checked="row.editable">
<label class="small"> Editable </label><input type="checkbox" ng-model="panel.editable" ng-checked="row.editable" />
</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>Delete</th>
<th>Move</th>
</thead>
<tr ng-repeat="panel in row.panels">
<td>{{panel.title}}</td>
<td>{{panel.type}}</td>
<td><i ng-click="row.panels = _.without(row.panels,panel)" class="icon-remove"></i></td>
<td><i ng-click="_.move(row.panels,$index,$index-1)" ng-hide="$first" class="icon-arrow-up"></i></td>
<td><i ng-click="_.move(row.panels,$index,$index+1)" ng-hide="$last" class="icon-arrow-down"></i></td>
</tr>
</table>
</div>
</div>
<h4>New Panel</h4>
<select class="input-medium" ng-model="panel.type" ng-options="f for f in config.modules"></select>
<small>Select Type</small>
<div ng-show="!(_.isUndefined(panel.type))">
<div ng-include src="'partials/panelgeneral.html'"></div>
<div ng-include src="'panels/'+panel.type+'/editor.html'"></div>
<button ng-click="add_panel(row,panel); reset_panel();" class="btn btn-primary">Create Panel</button><br>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" ng-click="dismiss()">Close</button>
<button type="button" class="btn btn-success" ng-click="dismiss();reset_panel();">Close</button>
</div>