roweditor.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <div class="modal-body">
  2. <div class="pull-right editor-title">Row settings</div>
  3. <div ng-model="editor.index" bs-tabs>
  4. <div ng-repeat="tab in ['General','Panels','Add Panel']" data-title="{{tab}}">
  5. </div>
  6. </div>
  7. <div class="row-fluid" ng-show="editor.index == 0">
  8. <div class="span4">
  9. <label class="small">Title</label><input type="text" class="input-medium" ng-model='row.title'></input>
  10. </div>
  11. <div class="span2">
  12. <label class="small">Height</label><input type="text" class="input-mini" ng-model='row.height'></input>
  13. </div>
  14. <div class="span1">
  15. <label class="small"> Editable </label><input type="checkbox" ng-model="row.editable" ng-checked="row.editable" />
  16. </div>
  17. <div class="span1">
  18. <label class="small"> Collapsable </label><input type="checkbox" ng-model="row.collapsable" ng-checked="row.collapsable" />
  19. </div>
  20. </div>
  21. <div class="row-fluid" ng-show="editor.index == 1">
  22. <div class="span12">
  23. <h4>Panels</h4>
  24. <table class="table table-condensed table-striped">
  25. <thead>
  26. <th>Title</th>
  27. <th>Type</th>
  28. <th>Span</th>
  29. <th>Delete</th>
  30. <th>Move</th>
  31. <th></th>
  32. <th>Hide</th>
  33. </thead>
  34. <tr ng-repeat="panel in row.panels">
  35. <td>{{panel.title}}</td>
  36. <td>{{panel.type}}</td>
  37. <td><select ng-hide="panel.sizeable == false" class="input-mini" ng-model="panel.span" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10,11,12]"></select></td>
  38. <td><i ng-click="row.panels = _.without(row.panels,panel)" class="pointer icon-remove"></i></td>
  39. <td><i ng-click="_.move(row.panels,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
  40. <td><i ng-click="_.move(row.panels,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
  41. <td><input type="checkbox" ng-model="panel.hide" ng-checked="panel.hide"></td>
  42. </tr>
  43. </table>
  44. </div>
  45. </div>
  46. <div class="row-fluid" ng-show="editor.index == 2">
  47. <h4>Select Panel Type</h4>
  48. <form class="input-append">
  49. <select class="input-medium input-append" ng-model="panel.type" ng-options="f for f in config.modules|stringSort"></select>
  50. <small ng-show="!panel.type">Select Type</small></form>
  51. <div ng-show="!(_.isUndefined(panel.type))">
  52. <div add-panel="{{panel.type}}"></div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="modal-footer">
  57. <button ng-show="panel.type && editor.index == 2" ng-click="add_panel(row,panel); reset_panel(); editor.index == 1;" class="btn btn-success ">Add Panel</button>
  58. <button type="button" class="btn btn-danger" ng-click="editor.index=0;dismiss();reset_panel();close_edit()">Close</button>
  59. </div>