Skip to content

EspoCRM – Open Source CRM Application

Ref

Yurii54cdadc7bc17
diff --git a/client/src/views/record/kanban.js b/client/src/views/record/kanban.js
index 6c185ec931..69a31feb8d 100644
--- a/client/src/views/record/kanban.js
+++ b/client/src/views/record/kanban.js
@@ -391,22 +391,7 @@ class KanbanRecordView extends ListRecordView {
e.preventDefault();
- const id = target.dataset.id;
- const model = this.collection.get(id);
-
- const scope = this.getModelScope(id);
-
- const options = {
- id: id,
- model: model,
- };
-
- if (this.options.keepCurrentRootUrl) {
- options.rootUrl = this.getRouter().getCurrentUrl();
- }
-
- this.getRouter().navigate(`#${scope}/view/${id}`, {trigger: false});
- this.getRouter().dispatch(scope, 'view', options);
+ this.processLinkClick(target.dataset.id);
});
this.addHandler('auxclick', 'a.link', (e, target) => {
@@ -475,6 +460,28 @@ class KanbanRecordView extends ListRecordView {
});
}
+ /**
+ * @protected
+ * @type {string}
+ */
+ processLinkClick(id) {
+ const model = this.collection.get(id);
+
+ const scope = this.getModelScope(id);
+
+ const options = {
+ id: id,
+ model: model,
+ };
+
+ if (this.options.keepCurrentRootUrl) {
+ options.rootUrl = this.getRouter().getCurrentUrl();
+ }
+
+ this.getRouter().navigate(`#${scope}/view/${id}`, {trigger: false});
+ this.getRouter().dispatch(scope, 'view', options);
+ }
+
/**
* @private
*/
diff --git a/client/src/views/record/list-base.ts b/client/src/views/record/list-base.ts
index 093b7fc623..9e232dd015 100644
--- a/client/src/views/record/list-base.ts
+++ b/client/src/views/record/list-base.ts
@@ -2180,7 +2180,7 @@ abstract class ListBaseRecordView<
});
}
- private processLinkClick(id: string) {
+ protected processLinkClick(id: string) {
const scope = this.getModelScope(id);
const collection = this.collection.clone({withModels: true});