facilmap/frontend/app/map/types/edit-type-dropdown.html

31 wiersze
1.5 KiB
HTML
Czysty Wina Historia

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<form>
<div><input type="checkbox" id="control-colour-input" ng-model="field.controlColour" ng-disabled="!canControl('colour')"><label for="control-colour-input" ng-class="{disabled: !canControl('colour')}"> Control {{type.type}} colour</label></div>
<div ng-show="type.type == 'line'"><input type="checkbox" id="control-width-input" ng-model="field.controlWidth" ng-disabled="!canControl('width')"><label for="control-width-input" ng-class="{disabled: !canControl('width')}"> Control {{type.type}} width</label></div>
<table class="border">
<thead>
<tr>
<th>Option</th>
<th ng-show="field.controlColour">Colour</th>
<th ng-show="field.controlWidth">Width</th>
<th></th>
<th class="move"></th>
</tr>
</thead>
<tbody ui-sortable="sortableOptions" ng-model="field.options">
<tr ng-repeat="option in field.options">
<td><input type="text" ng-model="option.value"></td>
<td ng-show="field.controlColour"><input type="text" ng-model="option.colour" fp-colour-picker></td>
<td ng-show="field.controlWidth"><input type="text" ng-model="option.width" fp-spinner></td>
<td><button ng-click="deleteOption(option)"></button></td>
<td class="move"><span class="sort-handle ui-icon ui-icon-triangle-2-n-s"></span></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="4"><button ng-click="addOption()">+</button></td>
<td class="move"></td>
</tr>
</tfoot>
</table>
<div><button ng-click="save()">OK</button></div>
</form>