diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json
index 248c851d2c..3069dc9193 100644
--- a/demo-shell/resources/i18n/en.json
+++ b/demo-shell/resources/i18n/en.json
@@ -102,6 +102,7 @@
"DOCUMENT_LIST": {
"MULTISELECT_CHECKBOXES": "Multiselect (with checkboxes)",
"THUMBNAILS": "Enable Thumbnails",
+ "ALLOW_DROP_FILES": "Enable file drop support for rows",
"MULTIPLE_FILE_UPLOAD": "Multiple File Upload",
"FOLDER_UPLOAD": "Folder upload",
"CUSTOM_FILTER": "Custom extensions filter",
@@ -119,6 +120,7 @@
"COLUMNS": {
"DISPLAY_NAME": "Display name",
"IS_LOCKED": "Lock",
+ "NODE_ID": "Node id",
"TAG": "Tag",
"CREATED_BY": "Created by",
"CREATED_ON": "Created on",
diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.html b/demo-shell/src/app/components/app-layout/app-layout.component.html
index 24781cda59..b0b28fb9b8 100644
--- a/demo-shell/src/app/components/app-layout/app-layout.component.html
+++ b/demo-shell/src/app/components/app-layout/app-layout.component.html
@@ -19,7 +19,7 @@
-
+
this.redirectUrl = redirectUrl);
this.headerService.tooltip.subscribe(tooltip => this.tooltip = tooltip);
this.headerService.position.subscribe(position => this.position = position);
+ this.headerService.hideSidenav.subscribe(hideSidenav => this.hideSidenav = hideSidenav);
}
constructor(
diff --git a/demo-shell/src/app/components/config-editor/config-editor.component.html b/demo-shell/src/app/components/config-editor/config-editor.component.html
index fd2ede0d81..3f61f4d970 100644
--- a/demo-shell/src/app/components/config-editor/config-editor.component.html
+++ b/demo-shell/src/app/components/config-editor/config-editor.component.html
@@ -1,29 +1,41 @@
+
+
+
+ Metadata App config editor
+
+
-Metadata App config editor
+
+ Search App config editor
+
+
-
+
+ Excluded config file
+
+
+
-
-
-
-
-
-
-
-
Search App config editor
-
-
-
-
-
-
-
-
-
Excluded File config editor
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/demo-shell/src/app/components/config-editor/config-editor.component.scss b/demo-shell/src/app/components/config-editor/config-editor.component.scss
index 096ca654cb..904c629480 100644
--- a/demo-shell/src/app/components/config-editor/config-editor.component.scss
+++ b/demo-shell/src/app/components/config-editor/config-editor.component.scss
@@ -1,3 +1,16 @@
-.adf-metadata-editor {
- height: 300px;
+.adf-file-editor {
+ height: 500px;
+ width: 65%;
+ float: left;
+}
+
+.adf-list-confgurations {
+ float: left;
+ width: 30%;
+}
+
+.adf-list-confgurations-buttons {
+ width: 200px;
+ margin-left: 30%;
+ float: left;
}
diff --git a/demo-shell/src/app/components/config-editor/config-editor.component.ts b/demo-shell/src/app/components/config-editor/config-editor.component.ts
index 0de4c59baf..b1cbd5e75f 100644
--- a/demo-shell/src/app/components/config-editor/config-editor.component.ts
+++ b/demo-shell/src/app/components/config-editor/config-editor.component.ts
@@ -26,8 +26,9 @@ import { AppConfigService, NotificationService } from '@alfresco/adf-core';
export class ConfigEditorComponent {
editor: any;
- editorSearch: any;
- editorExcludedFile: any;
+ code: any;
+ field = 'content-metadata';
+ invalidJson = false;
editorOptions = {
theme: 'vs-dark',
@@ -37,79 +38,59 @@ export class ConfigEditorComponent {
formatOnType: true
};
- metadataConf: string;
- searchConf: string;
- excludedFileConf: string;
-
- onInitMetadata(editor) {
+ onInit(editor) {
this.editor = editor;
- setTimeout(() => {
- this.editor.getAction('editor.action.formatDocument').run();
- }, 1000);
- }
-
- onInitSearch(editor) {
- this.editorSearch = editor;
- setTimeout(() => {
- this.editorSearch.getAction('editor.action.formatDocument').run();
- }, 1000);
- }
-
- onInitExcludedFile(excludedFile) {
- this.editorExcludedFile = excludedFile;
- setTimeout(() => {
- this.editorExcludedFile.getAction('editor.action.formatDocument').run();
- }, 1000);
+ this.indentCode();
}
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']);
+ this.code = JSON.stringify(appConfig.config['content-metadata']);
}
- onSaveMetadata() {
+ onSave() {
try {
- this.appConfig.config['content-metadata'] = JSON.parse(this.editor.getValue());
+ this.appConfig.config[this.field] = JSON.parse(this.editor.getValue());
} catch (error) {
+ this.invalidJson = true;
this.notificationService.openSnackMessage(
- 'Wrong metadata configuration',
+ 'Wrong Code configuration ' + error,
4000
);
+ } finally {
+ if (!this.invalidJson) {
+ this.notificationService.openSnackMessage(
+ 'Saved'
+ );
+ }
}
}
- onSaveSearch() {
- try {
- this.appConfig.config['search'] = JSON.parse(this.editorSearch.getValue());
- } catch (error) {
- this.notificationService.openSnackMessage(
- 'Wrong search configuration',
- 4000
- );
- }
+ onClear() {
+ this.code = '';
}
- onSaveExcludedFile() {
- try {
- this.appConfig.config['files'] = JSON.parse(this.editorExcludedFile.getValue());
- } catch (error) {
- this.notificationService.openSnackMessage(
- 'Wrong exclude file configuration',
- 4000
- );
- }
+ fileConfClick() {
+ this.code = JSON.stringify(this.appConfig.config['files']);
+ this.field = 'files';
+ this.indentCode();
}
- onClearMetadata() {
- this.metadataConf = '';
+ searchConfClick() {
+ this.code = JSON.stringify(this.appConfig.config['search']);
+ this.field = 'search';
+ this.indentCode();
}
- onClearSearch() {
- this.searchConf = '';
+ metadataConfClick() {
+ this.code = JSON.stringify(this.appConfig.config['content-metadata']);
+ this.field = 'content-metadata';
+ this.indentCode();
}
- onClearExcludedFile() {
- this.searchConf = '';
+ indentCode() {
+ setTimeout(() => {
+ this.editor.getAction('editor.action.formatDocument').run();
+ }, 300);
}
+
}
diff --git a/demo-shell/src/app/components/file-view/file-view.component.html b/demo-shell/src/app/components/file-view/file-view.component.html
index 85cee40a1a..8bb715b546 100644
--- a/demo-shell/src/app/components/file-view/file-view.component.html
+++ b/demo-shell/src/app/components/file-view/file-view.component.html
@@ -70,6 +70,7 @@
Custom preset
+
@@ -227,6 +228,16 @@
+
+
+ Custom Toolbar
+
+
+