Compare commits

..

No commits in common. "8decff316b30f9e392424e8e2cb015cc75f44f40" and "ab99f6722cd76183b1f021ff980395b78032ffec" have entirely different histories.

2 changed files with 10 additions and 11 deletions

View File

@ -15,21 +15,19 @@ export abstract class AbstractSelectedItemComponent {
} }
handleOnView(item: IItem) { handleOnView(item: IItem) {
if (this.itemTypeService.hasViewer(item)) { var itemType = this.itemTypeService.itemTypes[item.itemType];
let viewer = this.itemTypeService.itemTypes[item.itemType]; if (itemType) {
let url = `/viewer/${viewer}/item/${item.code}`; if (itemType.viewer) {
this.router.navigate([url]); let url = `/viewer/${itemType.viewer}/item/${item.code}`;
this.router.navigate([url]);
}
} }
return false; return false;
} }
handleOnEdit(item: IItem) { handleOnEdit(item: IItem) {
var editor = "property"; let url = `/editor/property/item/${item.code}`;
if(this.itemTypeService.hasEditor(item)) { this.router.navigate([url]);
editor = this.itemTypeService.itemTypes[item.itemType].editor;
}
let url = `/editor/${editor}/item/${item.code}`
this.router.navigate([url]);
return false; return false;
} }

View File

@ -1,6 +1,7 @@
<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">