mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -1,6 +1,6 @@
|
||||
<ng-container *ngIf="nodeId">
|
||||
|
||||
<ng-template let-node="node" #sidebarTemplate>
|
||||
<ng-template let-node="node" #sidebarRightTemplate>
|
||||
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
|
||||
|
||||
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate">
|
||||
@@ -79,7 +79,9 @@
|
||||
data-automation-id="adf-text-custom-preset">
|
||||
</mat-form-field>
|
||||
|
||||
<button mat-raised-button id="adf-metadata-aplly" (click)="applyCustomPreset()" color="primary">Apply</button>
|
||||
<button mat-raised-button id="adf-metadata-aplly" (click)="applyCustomPreset()" color="primary">
|
||||
Apply
|
||||
</button>
|
||||
|
||||
</ng-container>
|
||||
</p>
|
||||
@@ -98,24 +100,194 @@
|
||||
</adf-info-drawer>
|
||||
</ng-template>
|
||||
|
||||
|
||||
<ng-template let-node="node" #sidebarLeftTemplate>
|
||||
<adf-info-drawer [title]="'Viewer Options'">
|
||||
|
||||
<adf-info-drawer-tab [label]="">
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-custoname"
|
||||
[color]="'primary'"
|
||||
(change)="toggleCustomName()"
|
||||
[checked]="customName">
|
||||
Custom Name
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<ng-container *ngIf="customName">
|
||||
<mat-form-field floatPlaceholder="float">
|
||||
<input matInput
|
||||
placeholder="Custom Name"
|
||||
[(ngModel)]="displayName"
|
||||
data-automation-id="adf-text-custom-name">
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-fileurl"
|
||||
[color]="'primary'"
|
||||
(change)="toggleFileUrl()"
|
||||
[checked]="fileUrlSwitch">
|
||||
Url File
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<ng-container *ngIf="fileUrlSwitch">
|
||||
<mat-form-field floatPlaceholder="float">
|
||||
<input matInput
|
||||
placeholder="Url File"
|
||||
[(ngModel)]="urlFile"
|
||||
data-automation-id="adf-text-file-url">
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-toolbar"
|
||||
[color]="'primary'"
|
||||
(change)="toggleShowToolbar()"
|
||||
[checked]="showToolbar">
|
||||
Show Toolbar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-goback"
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowGoBack()"
|
||||
[checked]="allowGoBack">
|
||||
Allow GoBack
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-openwith"
|
||||
[color]="'primary'"
|
||||
(change)="toggleOpenWith()"
|
||||
[checked]="openWith">
|
||||
Open With
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-moreactions"
|
||||
[color]="'primary'"
|
||||
(change)="toggleOpenMoreActions()"
|
||||
[checked]="moreActions">
|
||||
More Actions
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-download"
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowDownload()"
|
||||
[checked]="allowDownload">
|
||||
Allow Download
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-print"
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowPrint()"
|
||||
[checked]="allowPrint">
|
||||
Allow Print
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-share"
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowShare()"
|
||||
[checked]="allowShare">
|
||||
Allow Share
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-switch-allowsidebar"
|
||||
[color]="'primary'"
|
||||
(change)="toggleAllowSidebar()"
|
||||
[checked]="allowSidebar">
|
||||
Allow Sidebar
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<button mat-raised-button id="adf-switch-showrightsidebar" (click)="toggleShowRightSidebar()" color="primary">
|
||||
Toggle Right Sidebar
|
||||
</button>
|
||||
</p>
|
||||
|
||||
<p class="toggle">
|
||||
<button mat-raised-button id="adf-switch-showleftsidebar" (click)="hideLeftSidebar()" color="primary">
|
||||
Hide Left Sidebar
|
||||
</button>
|
||||
</p>
|
||||
|
||||
</adf-info-drawer-tab>
|
||||
|
||||
</adf-info-drawer>
|
||||
</ng-template>
|
||||
|
||||
<adf-viewer
|
||||
[nodeId]="nodeId"
|
||||
[allowPrint]="true"
|
||||
[allowSidebar]="true"
|
||||
[sidebarTemplate]="sidebarTemplate">
|
||||
[showSidebar]="showRightSidebar"
|
||||
[showLeftSidebar]="showLeftSidebar"
|
||||
[allowGoBack]="allowGoBack"
|
||||
[displayName]="displayName"
|
||||
[showToolbar]="showToolbar"
|
||||
[allowShare]="allowShare"
|
||||
[allowPrint]="allowPrint"
|
||||
[allowDownload]="allowDownload"
|
||||
[allowSidebar]="allowSidebar"
|
||||
[urlFile]="urlFile"
|
||||
[sidebarLeftTemplate]="sidebarLeftTemplate"
|
||||
[sidebarTemplate]="sidebarRightTemplate">
|
||||
|
||||
<adf-viewer-toolbar-actions>
|
||||
<button mat-icon-button>
|
||||
<adf-viewer-toolbar-actions *ngIf="moreActions">
|
||||
<button mat-icon-button id="adf-viewer-time">
|
||||
<mat-icon>alarm</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button>
|
||||
<button mat-icon-button id="adf-viewer-upload">
|
||||
<mat-icon>backup</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button>
|
||||
<button mat-icon-button id="adf-viewer-bug">
|
||||
<mat-icon>bug_report</mat-icon>
|
||||
</button>
|
||||
</adf-viewer-toolbar-actions>
|
||||
|
||||
<ng-container *ngIf="openWith">
|
||||
<adf-viewer-open-with>
|
||||
<button mat-menu-item>
|
||||
<mat-icon>dialpad</mat-icon>
|
||||
<span>Option 1</span>
|
||||
</button>
|
||||
<button mat-menu-item disabled>
|
||||
<mat-icon>voicemail</mat-icon>
|
||||
<span>Option 2</span>
|
||||
</button>
|
||||
<button mat-menu-item>
|
||||
<mat-icon>notifications_off</mat-icon>
|
||||
<span>Option 3</span>
|
||||
</button>
|
||||
</adf-viewer-open-with>
|
||||
</ng-container>
|
||||
|
||||
<!--
|
||||
<adf-viewer-extension [supportedExtensions]="['json']">
|
||||
<ng-template let-urlFileContent="urlFileContent" let-extension="extension">
|
||||
|
Reference in New Issue
Block a user