roweditor.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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-if="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-if="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 <span class="small">({{rowSpan(row)}}/12)</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="size for size 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-if="editor.index == 2">
  47. <h4>Select Panel Type</h4>
  48. <form class="form-inline">
  49. <select class="input-medium" ng-model="panel.type" ng-options="panelType for panelType in dashboard.availablePanels|stringSort"></select>
  50. <small ng-show="rowSpan(row) > 11">
  51. Note: This row is full, new panels will wrap to a new line. You should add another row.
  52. </small>
  53. </form>
  54. <div ng-show="!(_.isUndefined(panel.type))">
  55. <div add-panel="{{panel.type}}"></div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="modal-footer">
  60. <button ng-show="editor.index == 1" ng-click="editor.index = 2;" class="btn btn-success" ng-disabled="panel.loadingEditor">Add Panel</button>
  61. <button ng-show="panel.type && editor.index == 2" ng-click="add_panel(row,panel); reset_panel(); editor.index = 1;" class="btn btn-success" ng-disabled="panel.loadingEditor">Add Panel</button>
  62. <button type="button" class="btn btn-danger" ng-click="editor.index=0;dismiss();reset_panel();close_edit()">Close</button>
  63. </div>