-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsortablestringlist.html
28 lines (22 loc) · 1.09 KB
/
sortablestringlist.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div ng-controller="EpiphanyStringListController" class="stringlist-property">
<div ui-sortable="{{sortableOptions}}" ng-model="model.value">
<div ng-repeat="str in model.value track by $index">
<input type="text" class="input-xlarge"
name="stringfield"
index="{{$index}}"
ng-model="model.value[$index]"
ng-keydown="onKeydown($event, $index)"
want-focus="{{focusedRow}}"
ng-required="{{allowBlanks}}" />
<div class="handle">
<i class="icon icon-navigation"></i>
</div>
<a class="stringlist-remove" prevent-default
ng-click="hasMinimum() || removeRow($index)"
ng-class="{disabled: hasMinimum()}">
<i class="icon icon-remove"></i>
</a>
</div>
</div>
<button type="button" class="btn" ng-click="addRow()" ng-disabled="hasMaximum()" ng-class="{disabled: hasMaximum()}"><i class="icon icon-add"></i> Add</button>
</div>