Radek Krejci | 499d1ee | 2018-01-30 14:04:54 +0100 | [diff] [blame] | 1 | <ng-container *ngIf="type == 'edit' || node['new'] || node['deleted']; else menu"> |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 2 | <img *ngIf="type == 'edit' && node['info']['type'] != 4" class="icon_action" src="assets/netopeer/icons/close.svg" |
| 3 | onmouseover="this.src='assets/netopeer/icons/close_active.svg'" |
| 4 | onmouseout="this.src='assets/netopeer/icons/close.svg'" |
| 5 | (click)="closeCreatingDialog(node)"/> |
Radek Krejci | 9b41f5b | 2018-01-31 14:17:50 +0100 | [diff] [blame] | 6 | <img *ngIf="node['info']['type'] == 4 && (type == 'edit' || node['info']['key'])" class="icon_action" src="assets/netopeer/icons/tree_empty.svg"/> |
| 7 | <img *ngIf="type != 'edit' && node['dirty'] && !node['info']['key']" class="icon_action" src="assets/netopeer/icons/close.svg" |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 8 | onmouseover="this.src='assets/netopeer/icons/close_active.svg'" |
| 9 | onmouseout="this.src='assets/netopeer/icons/close.svg'" |
Radek Krejci | 9b41f5b | 2018-01-31 14:17:50 +0100 | [diff] [blame] | 10 | (click)="cancelModification(node)"/> |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 11 | </ng-container> |
| 12 | <ng-template #menu > |
Radek Krejci | f71867f | 2018-01-30 13:28:28 +0100 | [diff] [blame] | 13 | <span *ngIf="type == 'root' || node['info']['config']; else empty" |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 14 | (mouseenter)="showEditMenu($event)" |
Radek Krejci | 08ad0a8 | 2018-01-26 11:25:17 +0100 | [diff] [blame] | 15 | (mouseleave)="hideEditMenu($event.currentTarget.lastElementChild)"> |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 16 | <img class="icon_action" src="assets/netopeer/icons/menu.svg" |
| 17 | onmouseover="this.src='assets/netopeer/icons/menu_active.svg'" |
| 18 | onmouseout="this.src='assets/netopeer/icons/menu.svg'"/> |
| 19 | <div class="editmenu msg-rounded"> |
Radek Krejci | 9b41f5b | 2018-01-31 14:17:50 +0100 | [diff] [blame] | 20 | <div *ngIf="type != 'root' && !node['info']['key']" class="button_action" title="remove subtree {{node['path']}}" |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 21 | onmouseover="this.firstElementChild.src='assets/netopeer/icons/close_active.svg'" |
| 22 | onmouseout="this.firstElementChild.src='assets/netopeer/icons/close.svg'" |
| 23 | (click)="deleteSubtree(node);hideEditMenu($event.currentTarget.parentElement);"> |
| 24 | <img class="icon_action" src="assets/netopeer/icons/close.svg" /> |
| 25 | delete |
| 26 | </div> |
Radek Krejci | f71867f | 2018-01-30 13:28:28 +0100 | [diff] [blame] | 27 | <div *ngIf="type != 'root'" class="button_action" title="create sibling data node(s)" |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 28 | onmouseover="this.firstElementChild.src='assets/netopeer/icons/add_active.svg'" |
| 29 | onmouseout="this.firstElementChild.src='assets/netopeer/icons/add.svg'" |
| 30 | (click)="openCreatingDialog($event.currentTarget, node, true);hideEditMenu($event.currentTarget.parentElement);"> |
| 31 | <img class="icon_action" src="assets/netopeer/icons/add.svg" /> |
| 32 | create sibling |
| 33 | </div> |
Radek Krejci | f71867f | 2018-01-30 13:28:28 +0100 | [diff] [blame] | 34 | <div *ngIf="type == 'root' || (node['info']['type'] != 4 && node['info']['type'] != 8)" |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 35 | class="button_action" title="create children data node(s)" |
| 36 | onmouseover="this.firstElementChild.src='assets/netopeer/icons/add_active.svg'" |
| 37 | onmouseout="this.firstElementChild.src='assets/netopeer/icons/add.svg'" |
| 38 | (click)="openCreatingDialog($event.currentTarget, node, flase);hideEditMenu($event.currentTarget.parentElement);"> |
| 39 | <img class="icon_action" src="assets/netopeer/icons/add.svg" /> |
| 40 | create children |
| 41 | </div> |
| 42 | </div> |
| 43 | </span> |
| 44 | <ng-template #empty> |
| 45 | <img class="icon" src="assets/netopeer/icons/tree_empty.svg" /> |
| 46 | </ng-template> |
| 47 | </ng-template> |
| 48 | <ng-container *ngFor="let indent of indentation"> |
| 49 | <img *ngIf="!indent" class="indentation" src="assets/netopeer/icons/tree_cont.svg" /> |
| 50 | <img *ngIf="indent" class="indentation" src="assets/netopeer/icons/tree_empty.svg" /> |
| 51 | </ng-container> |
| 52 | <ng-container *ngIf="type != 'edit' || node['info']['type'] != 4"> |
| 53 | <ng-container *ngIf="type == 'value'; else nodes"> |
| 54 | <img class="indentation" src="assets/netopeer/icons/tree_empty.svg" /> |
| 55 | </ng-container> |
| 56 | <ng-template #nodes> |
| 57 | <img *ngIf="type == 'edit' || node['last']" class="indentation" src="assets/netopeer/icons/tree_last_branch.svg" /> |
| 58 | <img *ngIf="type == 'current' && !node['last']" class="indentation" src="assets/netopeer/icons/tree_branch.svg" /> |
Radek Krejci | f71867f | 2018-01-30 13:28:28 +0100 | [diff] [blame] | 59 | <img *ngIf="type == 'root'" class="indentation" src="assets/netopeer/icons/tree_root.svg" /> |
Radek Krejci | 6e772b2 | 2018-01-25 13:28:57 +0100 | [diff] [blame] | 60 | </ng-template> |
| 61 | </ng-container> |