EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Fix star and showmore
Yurii936265ca4684
diff --git a/client/src/views/record/kanban.js b/client/src/views/record/kanban.jsindex cfc65f265c..3ad02c53c1 100644--- a/client/src/views/record/kanban.js+++ b/client/src/views/record/kanban.js@@ -1377,10 +1377,15 @@ class KanbanRecordView extends ListRecordView {}getRowContainerHtml(id) {- return $('<div>')- .attr('data-id', id)- .addClass('item')- .get(0).outerHTML;+ const div = document.createElement('div');+ div.dataset.id = id;+ div.classList.add('item');++ if (this.isRecordStared(id)) {+ div.classList.add('starred');+ }++ return div.outerHTML;}// noinspection JSUnusedGlobalSymbolsdiff --git a/client/src/views/record/list-base.ts b/client/src/views/record/list-base.tsindex 44b7247990..757fe08c6b 100644--- a/client/src/views/record/list-base.ts+++ b/client/src/views/record/list-base.ts@@ -810,9 +810,7 @@ abstract class ListBaseRecordView<this.rowList.map(id => {return {id: id,- isStarred: this.hasStars && this.collection.get(id) ?- this.collection.get(id)?.attributes[this.starredAttribute] :- false,+ isStarred: this.isRecordStared(id),};}) : [];@@ -849,6 +847,15 @@ abstract class ListBaseRecordView<};}+ /**+ * @since 10.0.4+ */+ protected isRecordStared(id: string): boolean {+ return this.hasStars && this.collection.get(id) ?+ this.collection.get(id)?.attributes[this.starredAttribute] :+ false;+ }+protected init() {this.type = this.options.type || this.type;@@ -3279,6 +3286,10 @@ abstract class ListBaseRecordView<tr.dataset.id = id;tr.classList.add('list-row');+ if (this.isRecordStared(id)) {+ tr.classList.add('starred');+ }+return tr.outerHTML;}diff --git a/client/src/views/record/list-expanded.ts b/client/src/views/record/list-expanded.tsindex f5dc3e14b0..fc6e7a2224 100644--- a/client/src/views/record/list-expanded.ts+++ b/client/src/views/record/list-expanded.ts@@ -243,6 +243,10 @@ class ListExpandedRecordView<li.dataset.id = id;li.className = 'list-group-item list-row';+ if (this.isRecordStared(id)) {+ li.classList.add('starred');+ }+return li.outerHTML;}