Skip to content

Commit 37bb266

Browse files
committed
MonitoredObjectMappingTable: stay on the same...
...container when sorting
1 parent 30ee7ef commit 37bb266

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

library/Vspheredb/Web/Table/MonitoredObjectMappingTable.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use gipfl\IcingaWeb2\Link;
66
use gipfl\IcingaWeb2\Table\Extension\ZfSortablePriority;
7+
use ipl\Html\BaseHtmlElement;
8+
use ipl\Html\Html;
79

810
class MonitoredObjectMappingTable extends BaseTable
911
{
@@ -68,9 +70,23 @@ protected function initialize()
6870
]);
6971
}
7072

73+
// cloned from ZfSortablePriority, added data-base-target
74+
protected function xaddSortPriorityButtons(BaseHtmlElement $tr, $row)
75+
{
76+
$tr->add(
77+
Html::tag(
78+
'td',
79+
['data-base-target' => '_self'],
80+
$this->createUpDownButtons($row->{$this->getKeyColumn()})
81+
)
82+
);
83+
84+
return $tr;
85+
}
86+
7187
public function renderRow($row)
7288
{
73-
return $this->addSortPriorityButtons(
89+
return $this->xaddSortPriorityButtons(
7490
parent::renderRow($row),
7591
$row
7692
);

0 commit comments

Comments
 (0)