mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
This commit is contained in:
parent
f1424d1a8a
commit
5e43ec41b6
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
.viewer-loader-text {
|
.viewer-loader-text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host .page {
|
:host .page {
|
||||||
|
@ -42,6 +42,8 @@ export class ViewerComponent {
|
|||||||
@Output()
|
@Output()
|
||||||
showViewerChange: EventEmitter<boolean> = new EventEmitter<boolean>();
|
showViewerChange: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||||
|
|
||||||
|
otherMenu: any;
|
||||||
|
|
||||||
nameFile: string;
|
nameFile: string;
|
||||||
currentPdfDocument: any;
|
currentPdfDocument: any;
|
||||||
page: number;
|
page: number;
|
||||||
@ -52,6 +54,7 @@ export class ViewerComponent {
|
|||||||
|
|
||||||
ngOnChanges(changes) {
|
ngOnChanges(changes) {
|
||||||
if (this.showViewer) {
|
if (this.showViewer) {
|
||||||
|
this.hideOtherMenu();
|
||||||
if (!this.urlFile) {
|
if (!this.urlFile) {
|
||||||
throw new Error('Attribute urlFile is required');
|
throw new Error('Attribute urlFile is required');
|
||||||
}
|
}
|
||||||
@ -71,6 +74,9 @@ export class ViewerComponent {
|
|||||||
* close the viewer
|
* close the viewer
|
||||||
*/
|
*/
|
||||||
close() {
|
close() {
|
||||||
|
if (this.otherMenu) {
|
||||||
|
this.otherMenu.hidden = false;
|
||||||
|
}
|
||||||
this.showViewer = false;
|
this.showViewer = false;
|
||||||
this.showViewerChange.emit(this.showViewer);
|
this.showViewerChange.emit(this.showViewer);
|
||||||
}
|
}
|
||||||
@ -151,4 +157,10 @@ export class ViewerComponent {
|
|||||||
return localStorage.getItem('token');
|
return localStorage.getItem('token');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private hideOtherMenu() {
|
||||||
|
this.otherMenu = document.querySelector("header");
|
||||||
|
if (this.otherMenu) {
|
||||||
|
this.otherMenu.hidden = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user