mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix mat datetime picker regression
This commit is contained in:
@@ -18,3 +18,12 @@
|
||||
<button mat-raised-button id="adf-search-clear" (click)="onClearSearch()" color="primary">Clear Search configuration</button>
|
||||
|
||||
<br>
|
||||
|
||||
<h2>Excluded File config editor</h2>
|
||||
|
||||
<ngx-monaco-editor id="adf-excluded-file" class="adf-excluded-file-editor" [options]="editorOptions" [(ngModel)]="excludedFileConf" (onInit)="onInitExcludedFile($event)" ></ngx-monaco-editor>
|
||||
|
||||
<button mat-raised-button id="adf-excluded-file-save" (click)="onSaveExcludedFile()" color="primary">Save excluded file configuration</button>
|
||||
<button mat-raised-button id="adf-excluded-file-clear" (click)="onClearExcludedFile()" color="primary">Clear excluded file configuration</button>
|
||||
|
||||
<br>
|
||||
|
@@ -27,6 +27,7 @@ export class ConfigEditorComponent {
|
||||
|
||||
editor: any;
|
||||
editorSearch: any;
|
||||
editorExcludedFile: any;
|
||||
|
||||
editorOptions = {
|
||||
theme: 'vs-dark',
|
||||
@@ -38,6 +39,7 @@ export class ConfigEditorComponent {
|
||||
|
||||
metadataConf: string;
|
||||
searchConf: string;
|
||||
excludedFileConf: string;
|
||||
|
||||
onInitMetadata(editor) {
|
||||
this.editor = editor;
|
||||
@@ -53,9 +55,17 @@ export class ConfigEditorComponent {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
onInitExcludedFile(excludedFile) {
|
||||
this.editorExcludedFile = excludedFile;
|
||||
setTimeout(() => {
|
||||
this.editorExcludedFile.getAction('editor.action.formatDocument').run();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
constructor(private appConfig: AppConfigService, private notificationService: NotificationService) {
|
||||
this.metadataConf = JSON.stringify(appConfig.config['content-metadata']);
|
||||
this.searchConf = JSON.stringify(appConfig.config['search']);
|
||||
this.excludedFileConf = JSON.stringify(appConfig.config['files']);
|
||||
}
|
||||
|
||||
onSaveMetadata() {
|
||||
@@ -71,10 +81,21 @@ export class ConfigEditorComponent {
|
||||
|
||||
onSaveSearch() {
|
||||
try {
|
||||
this.appConfig.config['search'] = JSON.parse(this.editor.getValue());
|
||||
this.appConfig.config['search'] = JSON.parse(this.editorSearch.getValue());
|
||||
} catch (error) {
|
||||
this.notificationService.openSnackMessage(
|
||||
'Wrong sSearch configuration',
|
||||
'Wrong search configuration',
|
||||
4000
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onSaveExcludedFile() {
|
||||
try {
|
||||
this.appConfig.config['files'] = JSON.parse(this.editorExcludedFile.getValue());
|
||||
} catch (error) {
|
||||
this.notificationService.openSnackMessage(
|
||||
'Wrong exclude file configuration',
|
||||
4000
|
||||
);
|
||||
}
|
||||
@@ -87,4 +108,8 @@ export class ConfigEditorComponent {
|
||||
onClearSearch() {
|
||||
this.searchConf = '';
|
||||
}
|
||||
|
||||
onClearExcludedFile() {
|
||||
this.searchConf = '';
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,15 @@
|
||||
<h1>Overlay Viewer</h1>
|
||||
|
||||
<p class="toggle">
|
||||
<mat-slide-toggle
|
||||
id="adf-viewer-overlay"
|
||||
[color]="'primary'"
|
||||
(change)="toggleOverlay()"
|
||||
[checked]="isOverlay">
|
||||
Overlay
|
||||
</mat-slide-toggle>
|
||||
</p>
|
||||
|
||||
<adf-document-list
|
||||
currentFolderId="-my-"
|
||||
(preview)="showPreview($event)">
|
||||
@@ -7,6 +17,6 @@
|
||||
|
||||
<adf-viewer
|
||||
[(showViewer)]="showViewer"
|
||||
[overlayMode]="true"
|
||||
[overlayMode]="isOverlay"
|
||||
[fileNodeId]="nodeId">
|
||||
</adf-viewer>
|
||||
|
@@ -26,6 +26,11 @@ export class OverlayViewerComponent {
|
||||
showViewer = false;
|
||||
|
||||
nodeId: string;
|
||||
isOverlay = true;
|
||||
|
||||
toggleOverlay() {
|
||||
this.isOverlay = !this.isOverlay;
|
||||
}
|
||||
|
||||
showPreview(event) {
|
||||
if (event.value.entry.isFile) {
|
||||
|
Reference in New Issue
Block a user