unitEditor.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!-- unitEditor -->
  2. <div>
  3. <div class="form-group">
  4. <table class="table">
  5. <tr>
  6. <td colspan="2">
  7. <input type="text"
  8. style="text-align: center;"
  9. class="form-control"
  10. data-ng-model="$ctrl.unit.name">
  11. </td>
  12. </tr>
  13. <tr>
  14. <td>
  15. <label for="symbol">Symbol:</label>
  16. <input id="symbol"
  17. class="form-control"
  18. type="text"
  19. data-ng-model="$ctrl.unit.symbol" />
  20. </td>
  21. <td>
  22. <label for="conversion">Conversion:</label>
  23. <input id="conversion"
  24. class="form-control"
  25. type="number"
  26. data-ng-model="$ctrl.unit.conversion" />
  27. </td>
  28. </tr>
  29. <tr>
  30. <td colspan="2">
  31. <label for="type">Type:</label>
  32. <select id="type" class="form-control"
  33. data-ng-model="$ctrl.unit.type"
  34. data-ng-options="type.toLowerCase() as type for type in unitTypes">
  35. </select>
  36. </td>
  37. </tr>
  38. <tr>
  39. <table class="table table-hover table-responsive">
  40. <tr>
  41. <td colspan="2">
  42. <label for="newAlias">Aliases:</label>
  43. <input id="newAlias" class="form-control" type="text"
  44. data-ng-model="newAlias"
  45. data-my-on-enter="addAlias(newAlias);" />
  46. </td>
  47. </tr>
  48. <tr data-ng-repeat="alias in $ctrl.unit.aliases">
  49. <td style="width: 100%; padding-left: 1em;">
  50. <span>{{alias}}</span>
  51. </td>
  52. <td>
  53. <button class="btn btn-danger" data-ng-click="deleteAlias($index)">
  54. Delete
  55. </button>
  56. </td>
  57. </tr>
  58. </table>
  59. </tr>
  60. </table>
  61. </div>
  62. </div>