EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Dashlet action iconClass
Yurii33cb1b9b596f
diff --git a/client/modules/crm/src/views/dashlets/activities.js b/client/modules/crm/src/views/dashlets/activities.jsindex 845ca0070b..7457e54a29 100644--- a/client/modules/crm/src/views/dashlets/activities.js+++ b/client/modules/crm/src/views/dashlets/activities.js@@ -139,7 +139,7 @@ class ActivitiesDashletView extends BaseDashletView {this.actionList.unshift({name: 'createActivity',text: this.translate('Create ' + scope, 'labels', scope),- iconHtml: '<span class="fas fa-plus"></span>',+ iconClass: 'fas fa-plus',url: '#' + scope + '/create',data: {scope: scope,diff --git a/client/modules/crm/src/views/dashlets/calendar.js b/client/modules/crm/src/views/dashlets/calendar.jsindex 96e45ed0a3..8a01ad3d0d 100644--- a/client/modules/crm/src/views/dashlets/calendar.js+++ b/client/modules/crm/src/views/dashlets/calendar.js@@ -116,7 +116,7 @@ class CalendarDashletView extends BaseDashletView {name: 'viewCalendar',text: this.translate('View Calendar', 'labels', 'Calendar'),url: '#Calendar',- iconHtml: '<span class="far fa-calendar-alt"></span>',+ iconClass: 'far fa-calendar-alt',onClick: () => this.actionViewCalendar(),});}diff --git a/client/res/templates/dashlet.tpl b/client/res/templates/dashlet.tplindex 705f2df8c8..acbb8bc635 100644--- a/client/res/templates/dashlet.tpl+++ b/client/res/templates/dashlet.tpl@@ -33,7 +33,11 @@>{{#if iconHtml}}{{{iconHtml}}}{{else}}- <span class="empty-icon"> </span>+ {{~#if iconClass~}}+ <span class="{{iconClass}}"></span>+ {{~else~}}+ <span class="empty-icon"> </span>+ {{~/if~}}{{/if}}<span class="item-text">{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label}}{{/if}}{{/if}}</span></a>diff --git a/client/src/views/dashlets/abstract/base.js b/client/src/views/dashlets/abstract/base.jsindex 84a0ac67da..4eb1a054a2 100644--- a/client/src/views/dashlets/abstract/base.js+++ b/client/src/views/dashlets/abstract/base.js@@ -81,6 +81,7 @@ class BaseDashletView extends View {* @property {string} [text] A text.* @property {string} [title] A title (not translatable).* @property {string} [iconHtml] An icon HTML.+ * @property {string} [iconClass] An icon class. As of v10.0.* @property {string} [url] A link URL.* @property {function()} [onClick] A click handler.* @property {number} [groupIndex] A group index.@@ -102,19 +103,19 @@ class BaseDashletView extends View {{name: 'refresh',label: 'Refresh',- iconHtml: '<span class="fas fa-sync-alt"></span>',+ iconClass: 'fas fa-sync-alt',groupIndex: 10000,},{name: 'options',label: 'Options',- iconHtml: '<span class="fas fa-pencil-alt"></span>',+ iconClass: 'fas fa-pencil-alt',groupIndex: 10000,},{name: 'remove',label: 'Remove',- iconHtml: '<span class="fas fa-times"></span>',+ iconClass: 'fas fa-times',groupIndex: 10000,},]diff --git a/client/src/views/dashlets/abstract/record-list.js b/client/src/views/dashlets/abstract/record-list.jsindex b2130d81de..a8a92a5ec5 100644--- a/client/src/views/dashlets/abstract/record-list.js+++ b/client/src/views/dashlets/abstract/record-list.js@@ -194,7 +194,7 @@ class RecordListDashletView extends BaseDashletView {this.actionList.unshift({name: 'create',text: this.translate('Create ' + this.scope, 'labels', this.scope),- iconHtml: '<span class="fas fa-plus"></span>',+ iconClass: 'fas fa-plus',url: `#${this.scope}/create`,});}diff --git a/client/src/views/dashlets/emails.js b/client/src/views/dashlets/emails.jsindex 27501c2621..c08fd5b0d1 100644--- a/client/src/views/dashlets/emails.js+++ b/client/src/views/dashlets/emails.js@@ -41,7 +41,7 @@ class EmailsDashletView extends RecordListDashletView {this.actionList.unshift({name: 'compose',text: this.translate('Compose Email', 'labels', this.scope),- iconHtml: '<span class="fas fa-plus"></span>',+ iconClass: 'fas fa-plus',});}}diff --git a/client/src/views/dashlets/records.js b/client/src/views/dashlets/records.jsindex 11733f91ba..cb31d762c7 100644--- a/client/src/views/dashlets/records.js+++ b/client/src/views/dashlets/records.js@@ -68,8 +68,8 @@ class RecordsDashletView extends RecordListDashletView {this.actionList.unshift({name: 'create',text: this.translate('Create ' + scope, 'labels', scope),- iconHtml: '<span class="fas fa-plus"></span>',- url: '#' + scope + '/create',+ iconClass: 'fas fa-plus',+ url: `#${scope}/create`,});}}diff --git a/client/src/views/dashlets/stream.js b/client/src/views/dashlets/stream.jsindex b767b9e289..9e73b6ce71 100644--- a/client/src/views/dashlets/stream.js+++ b/client/src/views/dashlets/stream.js@@ -98,7 +98,7 @@ class StreamDashletView extends BaseDashletView {this.actionList.unshift({name: 'viewList',text: this.translate('View'),- iconHtml: '<span class="fas fa-align-justify"></span>',+ iconClass: '<span class="fas fa-align-justify',url: '#Stream',});@@ -106,7 +106,7 @@ class StreamDashletView extends BaseDashletView {this.actionList.unshift({name: 'create',text: this.translate('Create Post', 'labels'),- iconHtml: '<span class="fas fa-plus"></span>',+ iconClass: 'fas fa-plus',});}}diff --git a/client/src/views/import/list.js b/client/src/views/import/list.jsindex 6315accd72..b122819a2a 100644--- a/client/src/views/import/list.js+++ b/client/src/views/import/list.js@@ -36,7 +36,7 @@ class ImportListView extends ListView {super.setup();this.menu.buttons.unshift({- iconHtml: '<span class="fas fa-plus fa-sm"></span>',+ iconClass: 'fas fa-plus fa-sm',text: this.translate('New Import', 'labels', 'Import'),link: '#Import',acl: 'edit',