lemonldap-ng/lemonldap-ng-manager/site/static/forms/doubleHash.html

43 lines
1.4 KiB
HTML
Raw Normal View History

2016-06-03 13:34:14 +02:00
<!--
Special container to show hash in hash
-->
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{translateTitle(currentNode)}}</h3>
</div>
<div class="panel-body" ng-repeat="(n,h) in currentNode.data">
2016-06-03 13:34:14 +02:00
<div class="input-group">
<span class="input-group-addon" trspan="hostname"></span>
<input type="text" class="form-control" ng-model="n"/>
2016-06-03 13:34:14 +02:00
</div>
<table class="table table-striped">
<thead>
<tr><th width="40%" trspan="keys"></th><th width="40%" trspan="values"></th><th></th></tr>
</thead>
<tbody>
<tr ng-repeat="(k,v) in h.data">
2016-06-03 13:34:14 +02:00
<td><input class="form-control" ng-model="k"/></td>
<td><input class="form-control" ng-model="v"/></td>
<td><span class="link text-success glyphicon glyphicon-plus-sign" ng-click="h.new='new'"/></td>
2016-06-03 13:34:14 +02:00
<td>
<span class="link text-danger glyphicon glyphicon-minus-sign" ng-click="h.delete(k)"/>
2016-06-03 13:34:14 +02:00
<span ng-if="$last" class="link text-success glyphicon glyphicon-plus-sign" ng-click="h.push({'new':'new'})"/>
</td>
</tr>
</tbody>
</table>
</div>
<pre>{{currentNode|json}}</pre>
2016-06-03 13:34:14 +02:00
</div>
<script type="text/menu">
[{
'title': 'newHost',
'action': function(cn,scope){
console.log(cn);
if(!cn.data) cn.data={};
cn.data["newHost"]={"new":"value"};
2016-06-03 13:34:14 +02:00
},
'icon': 'plus-sign'
}]
</script>