[ADF-4125] simplify extension load in extension module (#4214)

* add extension load in extension module

* add viewer extensions

* fix license header

* fix node passed in the viewer extension

* fix node passed in the viewer extension

* startup factory extension

* startup factory extension

* fix script

* fix beta tag build

* fix build

* fix build

* refactoring configuration files

* extension using map

* fix build

* fix config

* fix test

* fix test
This commit is contained in:
Eugenio Romano
2019-02-22 14:19:41 +00:00
committed by GitHub
parent bf4d1a2806
commit bda7e07b52
92 changed files with 1035 additions and 785 deletions

View File

@@ -4,7 +4,7 @@
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate">
<adf-comments [nodeId]="nodeId" [readOnly]="isCommentDisabled"></adf-comments>
<adf-comments [nodeId]="nodeId" [readOnly]="!isCommentEnabled"></adf-comments>
</adf-info-drawer-tab>
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.PROPERTIES' | translate">

View File

@@ -1,3 +1,12 @@
.adf-viewer__sidebar {
width: 380px !important;
}
/* stylelint-disable */
.monaco-scrollable-element {
width: 600px;
}
adf-preview-extension {
width: 600px;
}

View File

@@ -17,7 +17,7 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ContentService, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
import { ContentService, AllowableOperationsEnum, PermissionsEnum, NodesApiService } from '@alfresco/adf-core';
import { MatSnackBar } from '@angular/material';
@Component({
@@ -52,7 +52,7 @@ export class FileViewComponent implements OnInit {
showLeftSidebar = null;
showRightSidebar = false;
customToolbar = false;
isCommentDisabled = false;
isCommentEnabled = false;
constructor(private router: Router,
private route: ActivatedRoute,
@@ -68,7 +68,8 @@ export class FileViewComponent implements OnInit {
this.nodeApiService.getNode(id).subscribe(
(node) => {
if (node && node.isFile) {
this.isCommentDisabled = this.contentServices.hasPermissions(node, PermissionsEnum.CONSUMER);
this.isCommentEnabled = this.contentServices.hasPermissions(node, PermissionsEnum.NOT_CONSUMER) ||
this.contentServices.hasAllowableOperations(node, AllowableOperationsEnum.UPDATE);
this.nodeId = id;
return;
}