2019-10-02 07:54:52 +00:00
|
|
|
|
2019-10-02 12:12:17 +00:00
|
|
|
<ul ng-if="$ctrl.items">
|
2019-10-02 07:54:52 +00:00
|
|
|
<li ng-repeat="item in $ctrl.items" >
|
2019-10-01 09:15:15 +00:00
|
|
|
<div
|
2019-10-02 07:54:52 +00:00
|
|
|
ng-class="{expanded: item.active}"
|
2019-10-04 10:20:49 +00:00
|
|
|
ng-click="$ctrl.onClick($event, item)"
|
2019-10-01 09:15:15 +00:00
|
|
|
class="node clickable">
|
|
|
|
<vn-icon
|
|
|
|
class="arrow"
|
2019-10-02 12:12:17 +00:00
|
|
|
ng-class="{invisible: !item.sons}"
|
2019-10-01 09:15:15 +00:00
|
|
|
icon="keyboard_arrow_down"
|
2019-10-02 12:12:17 +00:00
|
|
|
translate-attr="::{title: 'Toggle'}">
|
2019-10-01 09:15:15 +00:00
|
|
|
</vn-icon>
|
2019-10-02 07:54:52 +00:00
|
|
|
<vn-treeview-content
|
2019-10-02 12:12:17 +00:00
|
|
|
item="::item">
|
2019-10-02 07:54:52 +00:00
|
|
|
</vn-treeview-content>
|
2019-10-08 05:22:38 +00:00
|
|
|
<section class="buttons" ng-if="::!$ctrl.treeview.readOnly">
|
|
|
|
<vn-icon-button translate-attr="::{title: 'Remove'}"
|
2019-10-04 09:01:47 +00:00
|
|
|
icon="delete"
|
2019-10-08 05:22:38 +00:00
|
|
|
ng-click="$ctrl.treeview.onRemove(item)"
|
|
|
|
ng-if="item.parent">
|
|
|
|
</vn-icon-button>
|
|
|
|
<vn-icon-button translate-attr="::{title: 'Create'}"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="$ctrl.treeview.onCreate(item)">
|
2019-10-04 09:01:47 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</section>
|
2019-10-01 09:15:15 +00:00
|
|
|
</div>
|
2019-10-02 07:54:52 +00:00
|
|
|
<vn-treeview-childs
|
2019-10-01 09:15:15 +00:00
|
|
|
items="item.childs"
|
2019-10-02 12:12:17 +00:00
|
|
|
parent="::item">
|
2019-10-02 07:54:52 +00:00
|
|
|
</vn-treeview-childs>
|
|
|
|
</li>
|
2019-10-02 12:12:17 +00:00
|
|
|
</ul>
|