From e5ef53b374af9691b93fa476f37ffe384eed2c6b Mon Sep 17 00:00:00 2001
From: Georg Ringer <georg.ringer@gmail.com>
Date: Fri, 27 Mar 2020 01:58:39 +0100
Subject: [PATCH] [BUGFIX] Keep classes in recordlist in workspaces

Workspace overlays modify the CSS classes which are used in the record
list. However the class `t3js-entity` is also used for JS magic and needs
always be applied.

Resolves: #86933
Releases: master, 9.5
Change-Id: I0ea1f4ea0ed5bc3b48eee4563e75d2c1d013a32c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63943
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog <look@susi.dev>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
---
 .../recordlist/Classes/RecordList/DatabaseRecordList.php     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
index 72fa2f50053e..42b6cb260a3b 100644
--- a/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
+++ b/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
@@ -1252,7 +1252,7 @@ class DatabaseRecordList
         }
 
         $tagAttributes = [
-            'class' => ['t3js-entity'],
+            'class' => [],
             'data-table' => $table,
             'title' => 'id=' . $row['uid'],
         ];
@@ -1276,6 +1276,9 @@ class DatabaseRecordList
         if (!empty($row['_CSSCLASS'])) {
             $tagAttributes['class'] = [$row['_CSSCLASS']];
         }
+
+        $tagAttributes['class'][] = 't3js-entity';
+
         // Incr. counter.
         $this->counter++;
         // The icon with link
-- 
GitLab