Fix rows highlighting after refresh

fixes #6705
This commit is contained in:
Alexander Fuhr 2014-08-19 17:30:56 +02:00
parent 995355ec30
commit 6fe47bf5b0
3 changed files with 4 additions and 3 deletions

View File

@ -109,7 +109,7 @@ if ($hosts->count() === 0) {
<?php endif; ?>
<?= implode(' ', $icons) ?>
<?php endif ?>
<a href="<?= $this->compact ? $hostLink : $this->href(
<a class="select-click" href="<?= $this->compact ? $hostLink : $this->href(
'monitoring/show/host',
array('host' => $host->host_name)
) ?>"><?= $host->host_name ?></a>

View File

@ -99,7 +99,7 @@ foreach ($services as $service):
<?php if ($service->service_icon_image && ! preg_match('/[\'"]/', $service->service_icon_image)): ?>
<?= $this->icon($this->resolveMacros($service->service_icon_image, $service)) ?>
<?php endif ?>
<a href="<?= $serviceLink ?>"><?= $service->service_display_name ?></a><?php if ($this->showHost): ?> on <a href="<?= $hostLink ?>"><?= $service->host_name; ?>
<a class="select-click" href="<?= $serviceLink ?>"><?= $service->service_display_name ?></a><?php if ($this->showHost): ?> on <a href="<?= $hostLink ?>"><?= $service->host_name; ?>
<?php if ($service->host_state != 0): ?>
(<?= ucfirst($helper->monitoringState($service, 'host')); ?>)
<?php endif ?>

View File

@ -134,6 +134,7 @@
// Select a table row
$(document).on('click', 'table.multiselect tr[href]', { self: this }, this.rowSelected);
$(document).on('click', 'table.multiselect .select-click', { self: this }, this.rowSelected);
$(document).on('click', 'button', { self: this }, this.submitForm);
@ -400,7 +401,7 @@
rowSelected: function(event) {
var self = event.data.self;
var icinga = self.icinga;
var $tr = $(this);
var $tr = $(this).closest('tr');
var $table = $tr.closest('table.multiselect');
var data = self.icinga.ui.getSelectionKeys($table);
var url = $table.data('icinga-multiselect-url');