Compare commits
2 Commits
ab99f6722c
...
8decff316b
Author | SHA1 | Date | |
---|---|---|---|
|
8decff316b | ||
|
f21648386b |
@ -15,18 +15,20 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleOnView(item: IItem) {
|
handleOnView(item: IItem) {
|
||||||
var itemType = this.itemTypeService.itemTypes[item.itemType];
|
if (this.itemTypeService.hasViewer(item)) {
|
||||||
if (itemType) {
|
let viewer = this.itemTypeService.itemTypes[item.itemType];
|
||||||
if (itemType.viewer) {
|
let url = `/viewer/${viewer}/item/${item.code}`;
|
||||||
let url = `/viewer/${itemType.viewer}/item/${item.code}`;
|
this.router.navigate([url]);
|
||||||
this.router.navigate([url]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOnEdit(item: IItem) {
|
handleOnEdit(item: IItem) {
|
||||||
let url = `/editor/property/item/${item.code}`;
|
var editor = "property";
|
||||||
|
if(this.itemTypeService.hasEditor(item)) {
|
||||||
|
editor = this.itemTypeService.itemTypes[item.itemType].editor;
|
||||||
|
}
|
||||||
|
let url = `/editor/${editor}/item/${item.code}`
|
||||||
this.router.navigate([url]);
|
this.router.navigate([url]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<div class="app fullscreen" (click)="handleClick($event)" [ngClass]="{'fullscreen' :(fullScreen|async)}">
|
<div class="app fullscreen" (click)="handleClick($event)" [ngClass]="{'fullscreen' :(fullScreen|async)}">
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||||
<button type="button" class="btn btn-light" (click)="handleToggleMenu($event)"><i class="fa fa-bars" aria-hidden="true"></i></button>
|
<button type="button" class="btn btn-light" (click)="handleToggleMenu($event)"><i class="fa fa-bars" aria-hidden="true"></i></button>
|
||||||
<router-outlet class="logo" [routerLink]="['/']" name="logo"></router-outlet>
|
|
||||||
<router-outlet name="menu"></router-outlet>
|
<router-outlet name="menu"></router-outlet>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
Loading…
Reference in New Issue
Block a user