[ADF-3332][ADF-3352] Add property e2e test and leftsidebar viewer (#3814)

* new viewer test
left sidebar
fix height width no overlay viewer

* fix lint and failing e2e

* missing semi column

* fix test

* fix template

* documentation
This commit is contained in:
Eugenio Romano
2018-09-21 11:37:40 +01:00
committed by GitHub
parent cfbe3cfd86
commit 897a557afa
13 changed files with 870 additions and 72 deletions

View File

@@ -36,6 +36,20 @@ export class FileViewComponent implements OnInit {
isPreset = false;
customPreset: string = null;
displayDefaultProperties = true;
showToolbar = true;
displayName = null;
urlFile = null;
allowGoBack = true;
openWith = false;
allowDownload = true;
allowPrint = true;
allowShare = true;
allowSidebar = true;
moreActions = true;
customName = false;
fileUrlSwitch = false;
showLeftSidebar = null;
showRightSidebar = false;
constructor(private router: Router,
private route: ActivatedRoute,
@@ -44,7 +58,6 @@ export class FileViewComponent implements OnInit {
}
ngOnInit() {
this.route.params.subscribe(params => {
const id = params.nodeId;
if (id) {
@@ -82,6 +95,62 @@ export class FileViewComponent implements OnInit {
this.displayDefaultProperties = !this.displayDefaultProperties;
}
toggleShowToolbar() {
this.showToolbar = !this.showToolbar;
}
toggleAllowGoBack() {
this.allowGoBack = !this.allowGoBack;
}
toggleOpenWith() {
this.openWith = !this.openWith;
}
toggleAllowDownload() {
this.allowDownload = !this.allowDownload;
}
toggleAllowPrint() {
this.allowPrint = !this.allowPrint;
}
toggleAllowShare() {
this.allowShare = !this.allowShare;
}
toggleOpenMoreActions() {
this.moreActions = !this.moreActions;
}
toggleShowRightSidebar() {
this.showRightSidebar = !this.showRightSidebar;
}
hideLeftSidebar() {
this.showLeftSidebar = false;
}
toggleAllowSidebar() {
this.allowSidebar = !this.allowSidebar;
}
toggleCustomName() {
this.customName = !this.customName;
if (!this.customName) {
this.displayName = null;
}
}
toggleFileUrl() {
this.fileUrlSwitch = !this.fileUrlSwitch;
if (!this.fileUrlSwitch) {
this.urlFile = null;
}
}
togglePreset() {
this.isPreset = !this.isPreset;
if (!this.isPreset) {