Skip to content

Commit e95cc15

Browse files
committed
netopeerangular: add node info from schema into the table while adding new node
1 parent baa5bc2 commit e95cc15

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/public/templates.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/FIT/Bundle/ModuleDefaultBundle/Resources/public/netopeerangular/templates/directives/addItem.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,34 @@
66
/> :
77
</span>
88

9+
<span class="editbar" ng-if="child['$@'+$parent.keyName]">
10+
<i class="iconButton fa fa-question-circle" tooltip-placement="top" uib-tooltip="{{child['$@'+$parent.keyName]['description']}}" ng-if="child['$@'+$parent.keyName]['description']"></i>
11+
<i class="iconButton fa fa-asterisk red" tooltip-placement="top" uib-tooltip="Mandatory" ng-if="isMandatory($parent.keyName, child)"></i>
12+
</span>
13+
914
<select ng-model="$parent.valueType" ng-options="option for option in valueTypes" class="form-control input-sm" ng-show="showSelectbox && $parent.type !== 'List' && $parent.type !== 'Array' && $parent.keyName" ng-init="initParentValueType($parent)"></select>
1015

1116
<span ng-show="$parent.type === 'Array' || ($parent.keyName && $parent.valueType !== 'Object' && $parent.valueType !== 'List' && $parent.valueType !== 'Array' && $parent.valueType !== 'string:Object' && $parent.valueType !== 'string:List' && $parent.valueType !== 'string:Array' && $parent.type !== 'List')">
1217
<input type="{{ $parent.valueType == 'string:Number' || $parent.valueType == 'Number' ? 'number' : $parent.valueType == 'string:Boolean' || $parent.valueType == 'Boolean' ? 'checkbox' : 'text' }}" ng-model="newValueName" ng-blur="changeParentValueName(newValueName, child, $parent)" placeholder="Set a value" ng-show="!($parent.valueType == 'string:Enumeration' || $parent.valueType == 'Enumeration')">
1318
<select ng-model="selectboxValue" ng-options="option for option in getEnumValues($parent.keyName, child, $parent) track by option" ng-if="$parent.valueType == 'string:Enumeration' || $parent.valueType == 'Enumeration'" ng-blur="$parent.valueName = selectboxValue;"></select>
1419
</span>
1520

16-
<strong ng-if="$parent.$parent.$parent.newkey">{{$parent.$parent.$parent.newkey}}</strong>
21+
<strong ng-if="$parent.type === 'List' && $parent.$parent.$parent.newkey">{{$parent.$parent.$parent.newkey}}</strong>
1722
<button class="btn btn-primary btn-sm" ng-click="addItem($parent.keyName, child, $parent)">
1823
Add
1924
</button>
2025
<button class="btn btn-default btn-sm" ng-click="$parent.showAddKey=false">
2126
Cancel
2227
</button>
28+
29+
<table ng-if="child['$@'+$parent.keyName]" class="add-item-info-list">
30+
<tr ng-repeat="type in ['eltype', 'type', 'default', 'cases', 'units', 'children', 'description']" ng-if="child['$@'+$parent.keyName][type]">
31+
<td><strong>{{ type }}</strong></td>
32+
<td>{{ child['$@'+$parent.keyName][type] }}</td>
33+
</tr>
34+
</table>
2335
</span>
36+
2437
<span ng-if="!showAddKey">
2538
<button class="addObjectItemBtn" ng-click="$parent.showAddKey = true">
2639
<i class="fa fa-plus" ng-if="$parent.type !== 'List'" tooltip-placement="top" uib-tooltip="Add new item"></i>

0 commit comments

Comments
 (0)