Skip to content

EspoCRM – Open Source CRM Application

List menu icons

Yuriic64b0f8616df
diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseArticle.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseArticle.json
index a7b90e2543..f42f95b2a5 100644
--- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseArticle.json
+++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseArticle.json
@@ -22,12 +22,14 @@
"moveUp": {
"label": "Move Up",
"handler": "crm:handlers/knowledge-base-article/move",
- "acl": "edit"
+ "acl": "edit",
+ "iconClass": "fas fa-arrow-up"
},
"moveDown": {
"label": "Move Down",
"handler": "crm:handlers/knowledge-base-article/move",
- "acl": "edit"
+ "acl": "edit",
+ "iconClass": "fas fa-arrow-down"
},
"moveToBottom": {
"labelTranslation": "KnowledgeBaseArticle.labels.Move to Bottom",
diff --git a/application/Espo/Resources/metadata/clientDefs/Global.json b/application/Espo/Resources/metadata/clientDefs/Global.json
index 2d595ba4c7..3b569149d5 100644
--- a/application/Espo/Resources/metadata/clientDefs/Global.json
+++ b/application/Espo/Resources/metadata/clientDefs/Global.json
@@ -23,8 +23,7 @@
"handler": "handlers/record/lock-action",
"checkVisibilityFunction": "canBeLocked",
"actionFunction": "actionLock",
- "groupIndex": 9,
- "iconClass": "fas fa-lock"
+ "groupIndex": 9
},
{
"name": "unlock",
@@ -33,8 +32,7 @@
"handler": "handlers/record/lock-action",
"checkVisibilityFunction": "canBeUnlocked",
"actionFunction": "actionUnlock",
- "groupIndex": 9,
- "iconClass": "fas fa-unlock"
+ "groupIndex": 9
}
],
"massActionList": [
diff --git a/application/Espo/Resources/metadata/clientDefs/Pipeline.json b/application/Espo/Resources/metadata/clientDefs/Pipeline.json
index 1ab7857342..0dedb44f66 100644
--- a/application/Espo/Resources/metadata/clientDefs/Pipeline.json
+++ b/application/Espo/Resources/metadata/clientDefs/Pipeline.json
@@ -15,13 +15,15 @@
"label": "Move Up",
"groupIndex": 3,
"handler": "handlers/pipeline/move-row-action",
- "acl": "edit"
+ "acl": "edit",
+ "iconClass": "fas fa-arrow-up"
},
"moveDown": {
"label": "Move Down",
"groupIndex": 3,
"handler": "handlers/pipeline/move-row-action",
- "acl": "edit"
+ "acl": "edit",
+ "iconClass": "fas fa-arrow-down"
}
},
"relationshipPanels": {
diff --git a/client/modules/crm/src/views/call/record/row-actions/dashlet.js b/client/modules/crm/src/views/call/record/row-actions/dashlet.js
index 8eff9669f4..82ea520850 100644
--- a/client/modules/crm/src/views/call/record/row-actions/dashlet.js
+++ b/client/modules/crm/src/views/call/record/row-actions/dashlet.js
@@ -45,6 +45,7 @@ define('crm:views/call/record/row-actions/dashlet', ['views/record/row-actions/v
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
actionList.push({
@@ -66,6 +67,7 @@ define('crm:views/call/record/row-actions/dashlet', ['views/record/row-actions/v
scope: this.model.entityType
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/call/record/row-actions/default.js b/client/modules/crm/src/views/call/record/row-actions/default.js
index 6fc7225cc8..f471d1ae6a 100644
--- a/client/modules/crm/src/views/call/record/row-actions/default.js
+++ b/client/modules/crm/src/views/call/record/row-actions/default.js
@@ -45,6 +45,7 @@ define('crm:views/call/record/row-actions/default', ['views/record/row-actions/v
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
actionList.push({
action: 'setNotHeld',
@@ -65,6 +66,7 @@ define('crm:views/call/record/row-actions/default', ['views/record/row-actions/v
scope: this.model.entityType
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/meeting/record/row-actions/dashlet.js b/client/modules/crm/src/views/meeting/record/row-actions/dashlet.js
index 0c4d196888..e4b1608290 100644
--- a/client/modules/crm/src/views/meeting/record/row-actions/dashlet.js
+++ b/client/modules/crm/src/views/meeting/record/row-actions/dashlet.js
@@ -51,6 +51,7 @@ define('crm:views/meeting/record/row-actions/dashlet', ['views/record/row-action
scope: this.model.entityType,
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
actionList.push({
@@ -73,6 +74,7 @@ define('crm:views/meeting/record/row-actions/dashlet', ['views/record/row-action
scope: this.model.entityType,
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/meeting/record/row-actions/default.js b/client/modules/crm/src/views/meeting/record/row-actions/default.js
index 849405c9f7..30217eff3e 100644
--- a/client/modules/crm/src/views/meeting/record/row-actions/default.js
+++ b/client/modules/crm/src/views/meeting/record/row-actions/default.js
@@ -51,6 +51,7 @@ define('crm:views/meeting/record/row-actions/default', ['views/record/row-action
scope: this.model.entityType,
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
actionList.push({
@@ -73,6 +74,7 @@ define('crm:views/meeting/record/row-actions/default', ['views/record/row-action
scope: this.model.entityType,
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/record/row-actions/activities-dashlet.js b/client/modules/crm/src/views/record/row-actions/activities-dashlet.js
index c131a5dac7..db997a0ac1 100644
--- a/client/modules/crm/src/views/record/row-actions/activities-dashlet.js
+++ b/client/modules/crm/src/views/record/row-actions/activities-dashlet.js
@@ -49,6 +49,7 @@ define('crm:views/record/row-actions/activities-dashlet', ['views/record/row-act
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
}
} else {
@@ -61,6 +62,7 @@ define('crm:views/record/row-actions/activities-dashlet', ['views/record/row-act
scope: this.model.entityType
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
actionList.push({
action: 'setNotHeld',
@@ -83,6 +85,7 @@ define('crm:views/record/row-actions/activities-dashlet', ['views/record/row-act
scope: this.model.entityType
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/record/row-actions/activities.js b/client/modules/crm/src/views/record/row-actions/activities.js
index bba786b422..489ea9f815 100644
--- a/client/modules/crm/src/views/record/row-actions/activities.js
+++ b/client/modules/crm/src/views/record/row-actions/activities.js
@@ -39,6 +39,7 @@ define('crm:views/record/row-actions/activities', ['views/record/row-actions/rel
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit) {
@@ -50,6 +51,7 @@ define('crm:views/record/row-actions/activities', ['views/record/row-actions/rel
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_EDIT,
});
if (this.model.entityType === 'Meeting' || this.model.entityType === 'Call') {
@@ -60,6 +62,7 @@ define('crm:views/record/row-actions/activities', ['views/record/row-actions/rel
id: this.model.id,
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
list.push({
@@ -81,6 +84,7 @@ define('crm:views/record/row-actions/activities', ['views/record/row-actions/rel
id: this.model.id,
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/record/row-actions/history.js b/client/modules/crm/src/views/record/row-actions/history.js
index c46034f4da..f119c56fb3 100644
--- a/client/modules/crm/src/views/record/row-actions/history.js
+++ b/client/modules/crm/src/views/record/row-actions/history.js
@@ -39,6 +39,7 @@ define('crm:views/record/row-actions/history', ['views/record/row-actions/relati
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_VIEW,
}];
if (this.model.entityType === 'Email') {
@@ -49,6 +50,7 @@ define('crm:views/record/row-actions/history', ['views/record/row-actions/relati
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-reply',
});
}
@@ -62,6 +64,7 @@ define('crm:views/record/row-actions/history', ['views/record/row-actions/relati
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_EDIT,
},
]);
}
@@ -74,6 +77,7 @@ define('crm:views/record/row-actions/history', ['views/record/row-actions/relati
id: this.model.id
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/record/row-actions/tasks.js b/client/modules/crm/src/views/record/row-actions/tasks.js
index ae64e79eef..613defdeb8 100644
--- a/client/modules/crm/src/views/record/row-actions/tasks.js
+++ b/client/modules/crm/src/views/record/row-actions/tasks.js
@@ -39,6 +39,7 @@ define('crm:views/record/row-actions/tasks', ['views/record/row-actions/relation
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit) {
@@ -50,9 +51,11 @@ define('crm:views/record/row-actions/tasks', ['views/record/row-actions/relation
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_EDIT,
});
- if (!~['Completed', 'Canceled'].indexOf(this.model.get('status'))) {
+ // @todo Refactor.
+ if (!['Completed', 'Canceled'].includes(this.model.get('status'))) {
list.push({
action: 'Complete',
text: this.translate('Complete', 'labels', 'Task'),
@@ -60,6 +63,7 @@ define('crm:views/record/row-actions/tasks', ['views/record/row-actions/relation
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
}
}
@@ -72,6 +76,7 @@ define('crm:views/record/row-actions/tasks', ['views/record/row-actions/relation
id: this.model.id
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/task/record/row-actions/dashlet.js b/client/modules/crm/src/views/task/record/row-actions/dashlet.js
index 721268371d..4ae3ba0525 100644
--- a/client/modules/crm/src/views/task/record/row-actions/dashlet.js
+++ b/client/modules/crm/src/views/task/record/row-actions/dashlet.js
@@ -41,6 +41,7 @@ define('crm:views/task/record/row-actions/dashlet', ['views/record/row-actions/v
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
}
@@ -53,6 +54,7 @@ define('crm:views/task/record/row-actions/dashlet', ['views/record/row-actions/v
scope: this.model.entityType
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/modules/crm/src/views/task/record/row-actions/default.js b/client/modules/crm/src/views/task/record/row-actions/default.js
index 75c14dcef3..7d8ea514b3 100644
--- a/client/modules/crm/src/views/task/record/row-actions/default.js
+++ b/client/modules/crm/src/views/task/record/row-actions/default.js
@@ -41,6 +41,7 @@ define('crm:views/task/record/row-actions/default', ['views/record/row-actions/v
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'fas fa-check',
});
}
@@ -53,6 +54,7 @@ define('crm:views/task/record/row-actions/default', ['views/record/row-actions/v
scope: this.model.entityType
},
groupIndex: 0,
+ iconClass: Dep.ICON_CLASS_REMOVE,
});
}
diff --git a/client/res/templates/record/row-actions/default.tpl b/client/res/templates/record/row-actions/default.tpl
index 6d7fb3d390..4c6fb5e45a 100644
--- a/client/res/templates/record/row-actions/default.tpl
+++ b/client/res/templates/record/row-actions/default.tpl
@@ -22,7 +22,17 @@
{{#each data}}
data-{{hyphen @key}}="{{./this}}"
{{/each}}
- >{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if}}{{/if}}
+ >
+ {{~#if html~}}
+ {{{html}}}
+ {{~else~}}
+ {{~#if iconClass~}}
+ <span class="{{iconClass}} item-icon"></span>
+ {{~/if~}}
+ <span class="item-text">
+ {{~#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if~}}
+ </span>
+ {{~/if~}}
</a>
{{/if}}
</li>
diff --git a/client/src/views/email-folder/record/row-actions/default.js b/client/src/views/email-folder/record/row-actions/default.js
index 27588c83a4..9f173ebb52 100644
--- a/client/src/views/email-folder/record/row-actions/default.js
+++ b/client/src/views/email-folder/record/row-actions/default.js
@@ -40,6 +40,7 @@ export default class extends DefaultRowActionsView {
data: {
id: this.model.id,
},
+ iconClass: 'fas fa-arrow-down',
});
list.unshift({
@@ -48,6 +49,8 @@ export default class extends DefaultRowActionsView {
data: {
id: this.model.id,
},
+ iconClass: 'fas fa-arrow-up',
+
});
}
diff --git a/client/src/views/email/record/row-actions/dashlet.js b/client/src/views/email/record/row-actions/dashlet.js
index 65733b43aa..836844daa3 100644
--- a/client/src/views/email/record/row-actions/dashlet.js
+++ b/client/src/views/email/record/row-actions/dashlet.js
@@ -46,6 +46,7 @@ export default class extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit) {
@@ -57,6 +58,7 @@ export default class extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
}
]);
}
@@ -70,6 +72,7 @@ export default class extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'far fa-trash-alt'
});
} else {
list.push({
@@ -91,6 +94,7 @@ export default class extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
@@ -103,6 +107,7 @@ export default class extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'far fa-star',
});
} else {
list.push({
diff --git a/client/src/views/email/record/row-actions/default.js b/client/src/views/email/record/row-actions/default.js
index b8f31e0f9c..ddf1d18b11 100644
--- a/client/src/views/email/record/row-actions/default.js
+++ b/client/src/views/email/record/row-actions/default.js
@@ -47,6 +47,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
}];
if (
@@ -59,6 +60,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
data: {
id: this.model.id,
},
+ iconClass: 'far fa-paper-plane',
});
}
@@ -71,6 +73,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
},
]);
}
@@ -85,6 +88,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 1,
+ iconClass: 'far fa-star',
});
}
} else {
@@ -130,6 +134,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 2,
+ iconClass: 'far fa-trash-alt',
});
} else {
list.push({
@@ -150,6 +155,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 2,
+ iconClass: 'far fa-caret-square-down',
});
}
@@ -160,6 +166,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 2,
+ iconClass: 'far fa-folder',
});
} else if (
!this.model.attributes.isUsers &&
@@ -173,6 +180,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 2,
+ iconClass: 'far fa-folder',
});
}
@@ -184,6 +192,7 @@ class EmailDefaultRowActionView extends DefaultRowActionsView {
id: this.model.id
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
diff --git a/client/src/views/record/row-actions/default-kanban.js b/client/src/views/record/row-actions/default-kanban.js
index fcc7a00805..3628fceb86 100644
--- a/client/src/views/record/row-actions/default-kanban.js
+++ b/client/src/views/record/row-actions/default-kanban.js
@@ -39,6 +39,7 @@ class DefaultKanbanRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.moveOverRowAction && this.options.statusFieldIsEditable) {
@@ -61,6 +62,7 @@ class DefaultKanbanRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
});
}
@@ -74,6 +76,7 @@ class DefaultKanbanRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
diff --git a/client/src/views/record/row-actions/default.js b/client/src/views/record/row-actions/default.js
index 65920d6dbb..ff19e9c720 100644
--- a/client/src/views/record/row-actions/default.js
+++ b/client/src/views/record/row-actions/default.js
@@ -42,6 +42,7 @@ import View from 'view';
* text?: string,
* html?: string,
* viewKey?: string,
+ * iconClass?: string,
* }} module:views/record/row-actions/actions~item
*/
@@ -70,6 +71,10 @@ class DefaultRowActionsView extends View {
*/
handlers
+ static ICON_CLASS_VIEW = 'fas fa-expand';
+ static ICON_CLASS_EDIT= 'fas fa-pen-to-square';
+ static ICON_CLASS_REMOVE = 'fas fa-times';
+
/**
* @param {{
* acl?: {
@@ -180,6 +185,7 @@ class DefaultRowActionsView extends View {
},
link: `#${this.model.entityType}/view/${this.model.id}`,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
}];
if (this.checkAccess('edit')) {
@@ -191,6 +197,7 @@ class DefaultRowActionsView extends View {
},
link: `#${this.model.entityType}/edit/${this.model.id}`,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
});
}
@@ -204,6 +211,7 @@ class DefaultRowActionsView extends View {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
@@ -240,6 +248,7 @@ class DefaultRowActionsView extends View {
actualAction: item.name,
},
groupIndex: item.groupIndex,
+ iconClass: item.iconClass,
});
});
@@ -294,7 +303,15 @@ class DefaultRowActionsView extends View {
const defs = this.getMetadata().get(`clientDefs.${this.scope}.rowActionDefs`) || {};
list.forEach(action => {
- /** @type {{label?: string, labelTranslation?: string, acl?: string, groupIndex?: number}} */
+ /**
+ * @type {{
+ * label?: string,
+ * labelTranslation?: string,
+ * acl?: string,
+ * groupIndex?: number,
+ * iconClass?: string,
+ * }}
+ */
const itemDefs = defs[action] || {};
const text = itemDefs.labelTranslation ?
@@ -306,6 +323,7 @@ class DefaultRowActionsView extends View {
acl: itemDefs.acl,
text: text,
groupIndex: itemDefs.groupIndex,
+ iconClass: itemDefs.iconClass,
});
});
}
diff --git a/client/src/views/record/row-actions/edit-and-remove.js b/client/src/views/record/row-actions/edit-and-remove.js
index 83a4527322..42e29db443 100644
--- a/client/src/views/record/row-actions/edit-and-remove.js
+++ b/client/src/views/record/row-actions/edit-and-remove.js
@@ -42,6 +42,7 @@ class EditAndRemoveRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
});
}
@@ -53,6 +54,7 @@ class EditAndRemoveRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
diff --git a/client/src/views/record/row-actions/relationship-edit-and-remove.js b/client/src/views/record/row-actions/relationship-edit-and-remove.js
index fbfa0e7ed4..6ef07f7153 100644
--- a/client/src/views/record/row-actions/relationship-edit-and-remove.js
+++ b/client/src/views/record/row-actions/relationship-edit-and-remove.js
@@ -41,6 +41,7 @@ class RelationshipEditAndRemoveActionsView extends RelationshipActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: RelationshipEditAndRemoveActionsView.ICON_CLASS_EDIT,
});
}
@@ -52,6 +53,7 @@ class RelationshipEditAndRemoveActionsView extends RelationshipActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: RelationshipActionsView.ICON_CLASS_REMOVE,
});
}
diff --git a/client/src/views/record/row-actions/relationship-no-remove.js b/client/src/views/record/row-actions/relationship-no-remove.js
index 0088e6e7eb..c715cade55 100644
--- a/client/src/views/record/row-actions/relationship-no-remove.js
+++ b/client/src/views/record/row-actions/relationship-no-remove.js
@@ -42,6 +42,7 @@ export default class UserRelationshipNoRemoveRowActionsView extends Relationship
},
link: `#${this.model.entityType}/view/${this.model.id}`,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_VIEW,
});
if (this.options.acl.edit) {
@@ -53,6 +54,7 @@ export default class UserRelationshipNoRemoveRowActionsView extends Relationship
},
link: `#${this.model.entityType}/edit/${this.model.id}`,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_EDIT,
});
if (!this.options.unlinkDisabled) {
@@ -62,7 +64,7 @@ export default class UserRelationshipNoRemoveRowActionsView extends Relationship
data: {
id: this.model.id,
},
- groupIndex: 0,
+ groupIndex: 1,
});
}
}
diff --git a/client/src/views/record/row-actions/relationship-no-unlink.js b/client/src/views/record/row-actions/relationship-no-unlink.js
index 474632487e..8d1b27566a 100644
--- a/client/src/views/record/row-actions/relationship-no-unlink.js
+++ b/client/src/views/record/row-actions/relationship-no-unlink.js
@@ -26,9 +26,9 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-import RelationshipActionsView from 'views/record/row-actions/relationship';
+import RelationshipRowActionsView from 'views/record/row-actions/relationship';
-class RelationshipNoUnlinkActionsView extends RelationshipActionsView {
+class RelationshipNoUnlinkActionsView extends RelationshipRowActionsView {
getActionList() {
let list = [{
@@ -39,6 +39,7 @@ class RelationshipNoUnlinkActionsView extends RelationshipActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit) {
@@ -51,6 +52,7 @@ class RelationshipNoUnlinkActionsView extends RelationshipActionsView {
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_EDIT,
}
]);
}
@@ -63,6 +65,7 @@ class RelationshipNoUnlinkActionsView extends RelationshipActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_REMOVE,
});
}
diff --git a/client/src/views/record/row-actions/relationship-remove-only.js b/client/src/views/record/row-actions/relationship-remove-only.js
index 95b012dec1..05be6f883c 100644
--- a/client/src/views/record/row-actions/relationship-remove-only.js
+++ b/client/src/views/record/row-actions/relationship-remove-only.js
@@ -27,6 +27,7 @@
************************************************************************/
import RelationshipActionsView from 'views/record/row-actions/relationship';
+import RelationshipRowActionsView from 'views/record/row-actions/relationship';
class RelationshipRemoveOnlyActionsView extends RelationshipActionsView {
@@ -40,6 +41,7 @@ class RelationshipRemoveOnlyActionsView extends RelationshipActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_REMOVE,
},
];
}
diff --git a/client/src/views/record/row-actions/relationship-unlink-only.js b/client/src/views/record/row-actions/relationship-unlink-only.js
index ad6d5e5f64..662871b855 100644
--- a/client/src/views/record/row-actions/relationship-unlink-only.js
+++ b/client/src/views/record/row-actions/relationship-unlink-only.js
@@ -39,7 +39,7 @@ class RelationshipUnlinkOnlyActionsView extends RelationshipActionsView {
data: {
id: this.model.id,
},
- groupIndex: 0,
+ groupIndex: 1,
},
];
}
diff --git a/client/src/views/record/row-actions/relationship-view-and-edit.js b/client/src/views/record/row-actions/relationship-view-and-edit.js
index 11c4ca1d8c..cb6d719d64 100644
--- a/client/src/views/record/row-actions/relationship-view-and-edit.js
+++ b/client/src/views/record/row-actions/relationship-view-and-edit.js
@@ -26,9 +26,9 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-import RelationshipActionsView from 'views/record/row-actions/relationship';
+import RelationshipRowActionsView from 'views/record/row-actions/relationship';
-class RelationshipViewAndEditActionsView extends RelationshipActionsView {
+class RelationshipViewAndEditActionsView extends RelationshipRowActionsView {
getActionList() {
const list = [{
@@ -39,6 +39,7 @@ class RelationshipViewAndEditActionsView extends RelationshipActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit) {
@@ -50,6 +51,7 @@ class RelationshipViewAndEditActionsView extends RelationshipActionsView {
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_EDIT,
});
}
diff --git a/client/src/views/record/row-actions/relationship-view-and-unlink.js b/client/src/views/record/row-actions/relationship-view-and-unlink.js
index f6f2988fbc..32d8221e5e 100644
--- a/client/src/views/record/row-actions/relationship-view-and-unlink.js
+++ b/client/src/views/record/row-actions/relationship-view-and-unlink.js
@@ -26,9 +26,9 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-import RelationshipActionsView from 'views/record/row-actions/relationship';
+import RelationshipRowActionsView from 'views/record/row-actions/relationship';
-class RelationshipViewAndUnlinkActionsView extends RelationshipActionsView {
+class RelationshipViewAndUnlinkActionsView extends RelationshipRowActionsView {
getActionList() {
const list = [{
@@ -39,6 +39,7 @@ class RelationshipViewAndUnlinkActionsView extends RelationshipActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit && !this.options.unlinkDisabled) {
@@ -48,7 +49,7 @@ class RelationshipViewAndUnlinkActionsView extends RelationshipActionsView {
data: {
id: this.model.id,
},
- groupIndex: 0,
+ groupIndex: 1,
});
}
diff --git a/client/src/views/record/row-actions/relationship-view-only.js b/client/src/views/record/row-actions/relationship-view-only.js
index e22cc057db..b8e9d500b6 100644
--- a/client/src/views/record/row-actions/relationship-view-only.js
+++ b/client/src/views/record/row-actions/relationship-view-only.js
@@ -26,9 +26,9 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-import RelationshipActionsView from 'views/record/row-actions/relationship';
+import RelationshipRowActionsView from 'views/record/row-actions/relationship';
-class RelationshipViewOnlyActionsView extends RelationshipActionsView {
+class RelationshipViewOnlyActionsView extends RelationshipRowActionsView {
getActionList() {
return [
@@ -40,6 +40,7 @@ class RelationshipViewOnlyActionsView extends RelationshipActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: RelationshipRowActionsView.ICON_CLASS_VIEW,
}
];
}
diff --git a/client/src/views/record/row-actions/relationship.js b/client/src/views/record/row-actions/relationship.js
index 3c57c189e3..17a66bb17f 100644
--- a/client/src/views/record/row-actions/relationship.js
+++ b/client/src/views/record/row-actions/relationship.js
@@ -39,6 +39,7 @@ class RelationshipRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit && !this.options.editDisabled) {
@@ -50,6 +51,7 @@ class RelationshipRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
});
}
@@ -60,7 +62,7 @@ class RelationshipRowActionsView extends DefaultRowActionsView {
data: {
id: this.model.id,
},
- groupIndex: 0,
+ groupIndex: 1,
});
}
@@ -74,6 +76,7 @@ class RelationshipRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
diff --git a/client/src/views/record/row-actions/remove-only.js b/client/src/views/record/row-actions/remove-only.js
index 10a5c39f76..b3904d77a1 100644
--- a/client/src/views/record/row-actions/remove-only.js
+++ b/client/src/views/record/row-actions/remove-only.js
@@ -40,6 +40,7 @@ class RemoveOnlyRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
}
];
}
diff --git a/client/src/views/record/row-actions/view-and-edit.js b/client/src/views/record/row-actions/view-and-edit.js
index bbd55a7558..82758c2c5e 100644
--- a/client/src/views/record/row-actions/view-and-edit.js
+++ b/client/src/views/record/row-actions/view-and-edit.js
@@ -39,6 +39,7 @@ class ViewAndEditRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
}];
if (this.options.acl.edit) {
@@ -51,6 +52,7 @@ class ViewAndEditRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/edit/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_EDIT,
}
]);
}
diff --git a/client/src/views/record/row-actions/view-and-remove.js b/client/src/views/record/row-actions/view-and-remove.js
index 43aaa07001..4955ad5287 100644
--- a/client/src/views/record/row-actions/view-and-remove.js
+++ b/client/src/views/record/row-actions/view-and-remove.js
@@ -40,6 +40,7 @@ class ViewAndRemoveRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: 'fas fa-expand',
}];
if (this.options.acl.delete) {
@@ -50,6 +51,7 @@ class ViewAndRemoveRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: 'fas fa-times',
});
}
diff --git a/client/src/views/record/row-actions/view-only.js b/client/src/views/record/row-actions/view-only.js
index 04f7fe45dd..80058b1409 100644
--- a/client/src/views/record/row-actions/view-only.js
+++ b/client/src/views/record/row-actions/view-only.js
@@ -40,6 +40,7 @@ class ViewOnlyRowActionsView extends DefaultRowActionsView {
},
link: '#' + this.model.entityType + '/view/' + this.model.id,
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
},
];
}
diff --git a/client/src/views/stream/record/row-actions/default.js b/client/src/views/stream/record/row-actions/default.js
index 5c7d144ac1..000d21894e 100644
--- a/client/src/views/stream/record/row-actions/default.js
+++ b/client/src/views/stream/record/row-actions/default.js
@@ -78,6 +78,7 @@ class StreamDefaultNoteRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_VIEW,
});
}
@@ -89,6 +90,7 @@ class StreamDefaultNoteRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 0,
+ iconClass: DefaultRowActionsView.ICON_CLASS_REMOVE,
});
}
@@ -116,6 +118,7 @@ class StreamDefaultNoteRowActionsView extends DefaultRowActionsView {
id: this.model.id,
},
groupIndex: 2,
+ iconClass: 'fas fa-map-pin',
});
}
}
@@ -204,7 +207,7 @@ class StreamDefaultNoteRowActionsView extends DefaultRowActionsView {
const label = this.getHelper().escapeString(this.translate(type, 'reactions'));
let html = iconClass ?
- `<span class="${iconClass} text-soft item-icon"></span><span class="item-text">${label}</span>` :
+ `<span class="${iconClass} text-soft item-icon reaction-icon"></span><span class="item-text">${label}</span>` :
label;
const reacted = this.isUserReacted(type);
diff --git a/frontend/less/espo/elements/dropdown.less b/frontend/less/espo/elements/dropdown.less
index 908ffbe644..7ae4286ea3 100644
--- a/frontend/less/espo/elements/dropdown.less
+++ b/frontend/less/espo/elements/dropdown.less
@@ -152,34 +152,38 @@ ul {
&.dropdown-menu-with-icons,
&:has(> li > a > .item-icon) {
> li {
- a {
- padding-left: var(--10px);
- }
+ &:not(:has(.item-icon-grid)) {
+ a {
+ padding-left: var(--12px);
+ }
- .fas,
- .far,
- .glyphicon,
- .empty-icon {
- width: var(--16px);
- text-align: center;
- display: inline-block;
- color: var(--gray-soft);
- }
+ .fas,
+ .far,
+ .glyphicon,
+ .empty-icon {
+ width: var(--16px);
+ text-align: center;
+ display: inline-block;
+ color: var(--gray-soft);
+ }
- .item-icon {
- font-size: var(--12px);
- }
+ .item-icon {
+ font-size: var(--12px);
+ }
- .item-text {
- padding-left: var(--8px);
- position: static;
+ .item-text {
+ padding-left: var(--10px);
+ position: static;
+ }
}
}
}
&:has(> li > a > .item-icon) {
- > li > a:not(:has(> .item-icon)) {
- padding-left: var(--26px);
+ > li {
+ > a:not(:has(> .item-icon)):not(:has(* > .item-icon)) {
+ padding-left: var(--28px);
+ }
}
}
}
@@ -188,7 +192,7 @@ ul.dropdown-menu {
> li {
a {
.item-icon + .item-text {
- padding-left: var(--8px);
+ padding-left: var(--10px);
}
}
}
@@ -207,7 +211,17 @@ ul.dropdown-menu {
}
}
}
+ }
+ > li {
+ > a {
+ &,
+ > div {
+ > .reaction-icon {
+ font-size: var(--16px) !important;
+ }
+ }
+ }
}
}
diff --git a/schema/metadata/clientDefs.json b/schema/metadata/clientDefs.json
index b484cf7fdc..f3695134ad 100644
--- a/schema/metadata/clientDefs.json
+++ b/schema/metadata/clientDefs.json
@@ -191,6 +191,10 @@
"type": "integer",
"minimum": -100,
"description": "A group index."
+ },
+ "iconClass": {
+ "type": "string",
+ "description": "An icon class. As of v10.0."
}
}
}