From e2800c7dbf7637afde48d3f7bea4e86c4d5013e3 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 23 Apr 2025 10:03:57 +0300 Subject: [PATCH] additional icon classes in metadata --- .idea/jsonSchemas.xml | 19 +++++++++++++++++++ .vscode/settings.json | 6 ++++++ .../Resources/metadata/app/clientIcons.json | 3 +++ .../entity-manager/modals/select-icon.js | 2 ++ schema/metadata/app/clientIcons.json | 19 +++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 application/Espo/Resources/metadata/app/clientIcons.json create mode 100644 schema/metadata/app/clientIcons.json diff --git a/.idea/jsonSchemas.xml b/.idea/jsonSchemas.xml index 20c366d73d..db2a0435fb 100644 --- a/.idea/jsonSchemas.xml +++ b/.idea/jsonSchemas.xml @@ -341,6 +341,25 @@ + + + + + + + diff --git a/.vscode/settings.json b/.vscode/settings.json index 6aac458309..c17c9f67ec 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -190,6 +190,12 @@ ], "url": "./schema/metadata/app/client.json" }, + { + "fileMatch": [ + "*/Resources/metadata/app/clientIcons.json" + ], + "url": "./schema/metadata/app/clientIcons.json" + }, { "fileMatch": [ "*/Resources/metadata/app/clientRecord.json" diff --git a/application/Espo/Resources/metadata/app/clientIcons.json b/application/Espo/Resources/metadata/app/clientIcons.json new file mode 100644 index 0000000000..f443361441 --- /dev/null +++ b/application/Espo/Resources/metadata/app/clientIcons.json @@ -0,0 +1,3 @@ +{ + "classList": [] +} diff --git a/client/src/views/admin/entity-manager/modals/select-icon.js b/client/src/views/admin/entity-manager/modals/select-icon.js index fcad52889d..ee87b85718 100644 --- a/client/src/views/admin/entity-manager/modals/select-icon.js +++ b/client/src/views/admin/entity-manager/modals/select-icon.js @@ -1611,6 +1611,8 @@ export default class extends ModalView { "far fa-window-minimize", "far fa-window-restore" ]; + + this.iconList.push(...this.getMetadata().get('app.clientIcons.classList', [])); } // noinspection JSUnusedGlobalSymbols diff --git a/schema/metadata/app/clientIcons.json b/schema/metadata/app/clientIcons.json new file mode 100644 index 0000000000..100852b239 --- /dev/null +++ b/schema/metadata/app/clientIcons.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://www.espocrm.com/schema/metadata/app/clientIcons.json", + "title": "app/icons", + "description": "Client icons.", + "type": "object", + "properties": { + "classList": { + "description": "Icon classes.", + "type": "array", + "items": { + "anyOf": [ + {"type": "string"}, + {"enum": ["__APPEND__"]} + ] + } + } + } +}