Skip to content

EspoCRM – Open Source CRM Application

additional icon classes in metadata

Yuri Kuznetsove2800c7dbf76
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 @@
</SchemaInfo>
</value>
</entry>
+ <entry key="metadata/app/clientIcons">
+ <value>
+ <SchemaInfo>
+ <option name="generatedName" value="New Schema" />
+ <option name="name" value="metadata/app/clientIcons" />
+ <option name="relativePathToSchema" value="schema/metadata/app/clientIcons.json" />
+ <option name="schemaVersion" value="JSON Schema version 7" />
+ <option name="patterns">
+ <list>
+ <Item>
+ <option name="pattern" value="true" />
+ <option name="path" value="*/Resources/metadata/app/clientIcons.json" />
+ <option name="mappingKind" value="Pattern" />
+ </Item>
+ </list>
+ </option>
+ </SchemaInfo>
+ </value>
+ </entry>
<entry key="metadata/app/clientRecord">
<value>
<SchemaInfo>
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__"]}
+ ]
+ }
+ }
+ }
+}