mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3643] Viewer shows both sidebar icons (#3852)
* Viewer shows both sidebar icons * update readme * add config editor for start-process
This commit is contained in:
@@ -20,6 +20,27 @@
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
|
||||
<mat-list-item (click)="taskHeaderConfClick()">
|
||||
<a matLine id="adf-task-conf" >Task header</a>
|
||||
<button mat-icon-button>
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
|
||||
<mat-list-item (click)="processInstanceHeaderConfClick()">
|
||||
<a matLine id="adf-process-conf" >Process instance Header</a>
|
||||
<button mat-icon-button>
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
|
||||
<mat-list-item (click)="startProcessConfClick()">
|
||||
<a matLine id="adf-start-process-conf">Start process</a>
|
||||
<button mat-icon-button>
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
</mat-nav-list>
|
||||
|
||||
<div>
|
||||
|
@@ -87,6 +87,24 @@ export class ConfigEditorComponent {
|
||||
this.indentCode();
|
||||
}
|
||||
|
||||
taskHeaderConfClick() {
|
||||
this.code = JSON.stringify(this.appConfig.config['adf-task-header']);
|
||||
this.field = 'adf-task-header';
|
||||
this.indentCode();
|
||||
}
|
||||
|
||||
processInstanceHeaderConfClick() {
|
||||
this.code = JSON.stringify(this.appConfig.config['adf-process-instance-header']);
|
||||
this.field = 'adf-process-instance-header';
|
||||
this.indentCode();
|
||||
}
|
||||
|
||||
startProcessConfClick() {
|
||||
this.code = JSON.stringify(this.appConfig.config['adf-start-process']);
|
||||
this.field = 'adf-start-process';
|
||||
this.indentCode();
|
||||
}
|
||||
|
||||
indentCode() {
|
||||
setTimeout(() => {
|
||||
this.editor.getAction('editor.action.formatDocument').run();
|
||||
|
@@ -224,7 +224,17 @@
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowSidebar()"
|
||||
[checked]="allowSidebar">
|
||||
Allow Sidebar
|
||||
Allow Right Sidebar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-allowLeftSidebar"
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowLeftSidebar()"
|
||||
[checked]="allowLeftSidebar">
|
||||
Allow Left Sidebar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
@@ -268,6 +278,7 @@
|
||||
[allowPrint]="allowPrint"
|
||||
[allowDownload]="allowDownload"
|
||||
[allowSidebar]="allowSidebar"
|
||||
[allowLeftSidebar]="allowLeftSidebar"
|
||||
[urlFile]="urlFile"
|
||||
[sidebarLeftTemplate]="sidebarLeftTemplate"
|
||||
[sidebarTemplate]="sidebarRightTemplate">
|
||||
|
@@ -45,6 +45,7 @@ export class FileViewComponent implements OnInit {
|
||||
allowPrint = true;
|
||||
allowShare = true;
|
||||
allowSidebar = true;
|
||||
allowLeftSidebar = true;
|
||||
moreActions = true;
|
||||
customName = false;
|
||||
fileUrlSwitch = false;
|
||||
@@ -136,6 +137,10 @@ export class FileViewComponent implements OnInit {
|
||||
this.allowSidebar = !this.allowSidebar;
|
||||
}
|
||||
|
||||
toggleAllowLeftSidebar() {
|
||||
this.allowLeftSidebar = !this.allowLeftSidebar;
|
||||
}
|
||||
|
||||
toggleCustomName() {
|
||||
this.customName = !this.customName;
|
||||
|
||||
|
Reference in New Issue
Block a user