mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
committed by
Eugenio Romano
parent
8959476941
commit
0b246b8211
@@ -19,7 +19,6 @@ import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { ContentService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'img-viewer',
|
||||
templateUrl: './imgViewer.component.html',
|
||||
styleUrls: ['./imgViewer.component.css']
|
||||
|
@@ -19,7 +19,6 @@ import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { ContentService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'media-player',
|
||||
templateUrl: './mediaPlayer.component.html',
|
||||
styleUrls: ['./mediaPlayer.component.css']
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'not-supported-format',
|
||||
templateUrl: './notSupportedFormat.component.html',
|
||||
styleUrls: ['./notSupportedFormat.component.css']
|
||||
|
@@ -80,7 +80,7 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
||||
|
||||
describe('View with url file', () => {
|
||||
beforeEach(() => {
|
||||
component.urlFile = 'base/src/assets/fake-test-file.pdf';
|
||||
component.urlFile = require('../assets/fake-test-file.pdf');
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
@@ -177,7 +177,7 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
||||
describe('User interaction', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
component.urlFile = 'base/src/assets/fake-test-file.pdf';
|
||||
component.urlFile = require('../assets/fake-test-file.pdf');
|
||||
fixture.detectChanges();
|
||||
component.inputPage('1');
|
||||
});
|
||||
@@ -315,7 +315,7 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
||||
|
||||
describe('Resize interaction', () => {
|
||||
beforeEach(() => {
|
||||
component.urlFile = 'base/src/assets/fake-test-file.pdf';
|
||||
component.urlFile = require('../assets/fake-test-file.pdf');
|
||||
component.inputPage('1');
|
||||
});
|
||||
it('resize event should trigger setScaleUpdatePages', (done) => {
|
||||
@@ -331,7 +331,7 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
|
||||
|
||||
describe('scroll interaction', () => {
|
||||
beforeEach(() => {
|
||||
component.urlFile = 'base/src/assets/fake-test-file.pdf';
|
||||
component.urlFile = require('../assets/fake-test-file.pdf');
|
||||
fixture.detectChanges();
|
||||
});
|
||||
it('scroll page should return the current page', (done) => {
|
||||
|
@@ -22,7 +22,6 @@ import { RenderingQueueServices } from '../services/rendering-queue.services';
|
||||
declare let PDFJS: any;
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'pdf-viewer',
|
||||
templateUrl: './pdfViewer.component.html',
|
||||
styleUrls: ['./pdfViewer.component.css', './pdfViewerHost.component.css'],
|
||||
|
@@ -228,7 +228,6 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #404040;
|
||||
background-image: url(images/texture.png);
|
||||
}
|
||||
|
||||
:host >>> body,
|
||||
|
@@ -21,7 +21,6 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'alfresco-viewer',
|
||||
templateUrl: './viewer.component.html',
|
||||
styleUrls: ['./viewer.component.css']
|
||||
@@ -73,8 +72,10 @@ export class ViewerComponent {
|
||||
|
||||
ngOnChanges(changes) {
|
||||
if (this.showViewer) {
|
||||
this.hideOtherHeaderBar();
|
||||
this.blockOtherScrollBar();
|
||||
if (this.overlayMode) {
|
||||
this.hideOtherHeaderBar();
|
||||
this.blockOtherScrollBar();
|
||||
}
|
||||
if (!this.urlFile && !this.blobFile && !this.fileNodeId) {
|
||||
throw new Error('Attribute urlFile or fileNodeId or blobFile is required');
|
||||
}
|
||||
|
Reference in New Issue
Block a user