From 5d5d9a74390b9e41f7ccaab5f1e896017305cbf1 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Thu, 5 Dec 2024 09:05:10 +0100 Subject: [PATCH 1/2] BaseTableRowItem: Make $table param mandantory for constructor The $table param was only nullable for the header in the detail view, which does not have a table. Now these headers are rendered with other classes, so the parameter should not be nullable now. --- src/Common/BaseTableRowItem.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Common/BaseTableRowItem.php b/src/Common/BaseTableRowItem.php index c24578fc..66e223a5 100644 --- a/src/Common/BaseTableRowItem.php +++ b/src/Common/BaseTableRowItem.php @@ -16,7 +16,7 @@ abstract class BaseTableRowItem extends BaseHtmlElement /** @var object The associated list item */ protected $item; - /** @var ?BaseItemTable The list where the item is part of */ + /** @var BaseItemTable The list where the item is part of */ protected $table; protected $tag = 'li'; @@ -25,17 +25,13 @@ abstract class BaseTableRowItem extends BaseHtmlElement * Create a new table row item * * @param object $item - * @param BaseItemTable|null $table + * @param BaseItemTable $table */ - public function __construct($item, BaseItemTable $table = null) + public function __construct($item, BaseItemTable $table) { $this->item = $item; $this->table = $table; - if ($table === null) { - $this->setTag('div'); - } - $this->addAttributes($this->baseAttributes); $this->init(); From e33cbce7a904057cfadbd2e981979860889ac0a5 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 9 Dec 2024 14:33:51 +0100 Subject: [PATCH 2/2] Remove unused css --- asset/css/list/item-list.less | 4 ---- 1 file changed, 4 deletions(-) diff --git a/asset/css/list/item-list.less b/asset/css/list/item-list.less index c5c0bd28..07290181 100644 --- a/asset/css/list/item-list.less +++ b/asset/css/list/item-list.less @@ -79,7 +79,3 @@ } } } - -.controls .list-item:not(:last-child) { - margin-bottom: .5em; -}