diff --git a/application/controllers/CommentsController.php b/application/controllers/CommentsController.php index 359bf777..3fbc47f7 100644 --- a/application/controllers/CommentsController.php +++ b/application/controllers/CommentsController.php @@ -89,7 +89,7 @@ class CommentsController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d comments'), $comments->count() diff --git a/application/controllers/DowntimesController.php b/application/controllers/DowntimesController.php index 9ae96656..28e22442 100644 --- a/application/controllers/DowntimesController.php +++ b/application/controllers/DowntimesController.php @@ -94,7 +94,7 @@ class DowntimesController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d downtimes'), $downtimes->count() diff --git a/application/controllers/HostgroupsController.php b/application/controllers/HostgroupsController.php index 9e67c265..043d5f2a 100644 --- a/application/controllers/HostgroupsController.php +++ b/application/controllers/HostgroupsController.php @@ -84,7 +84,7 @@ class HostgroupsController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d hostgroups'), $hostgroups->count() diff --git a/application/controllers/HostsController.php b/application/controllers/HostsController.php index bdb718bd..67781557 100644 --- a/application/controllers/HostsController.php +++ b/application/controllers/HostsController.php @@ -100,7 +100,7 @@ class HostsController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d hosts'), $hosts->count() diff --git a/application/controllers/NotificationsController.php b/application/controllers/NotificationsController.php index 28f62e2a..932264d8 100644 --- a/application/controllers/NotificationsController.php +++ b/application/controllers/NotificationsController.php @@ -83,7 +83,7 @@ class NotificationsController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d notifications'), $notifications->count() diff --git a/application/controllers/ServicegroupsController.php b/application/controllers/ServicegroupsController.php index 60fc4a3c..e7234b43 100644 --- a/application/controllers/ServicegroupsController.php +++ b/application/controllers/ServicegroupsController.php @@ -83,7 +83,7 @@ class ServicegroupsController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d servicegroups'), $servicegroups->count() diff --git a/application/controllers/ServicesController.php b/application/controllers/ServicesController.php index 5417f03b..cce07f1b 100644 --- a/application/controllers/ServicesController.php +++ b/application/controllers/ServicesController.php @@ -105,7 +105,7 @@ class ServicesController extends Controller if ($compact) { $this->addContent( (new ShowMore($results, Url::fromRequest()->without(['showCompact', 'limit']))) - ->setAttribute('data-base-target', '_next') + ->setBaseTarget('_next') ->setAttribute('title', sprintf( t('Show all %d services'), $services->count() diff --git a/library/Icingadb/Widget/ShowMore.php b/library/Icingadb/Widget/ShowMore.php index 3574a59b..b56aca04 100644 --- a/library/Icingadb/Widget/ShowMore.php +++ b/library/Icingadb/Widget/ShowMore.php @@ -6,11 +6,14 @@ namespace Icinga\Module\Icingadb\Widget; use ipl\Html\BaseHtmlElement; use ipl\Orm\ResultSet; +use ipl\Web\Common\BaseTarget; use ipl\Web\Url; use ipl\Web\Widget\ActionLink; class ShowMore extends BaseHtmlElement { + use BaseTarget; + protected $defaultAttributes = ['class' => 'show-more']; protected $tag = 'div';