mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
6fe47bf5b0
commit
ba748cbc4a
@ -109,7 +109,7 @@ if ($hosts->count() === 0) {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?= implode(' ', $icons) ?>
|
<?= implode(' ', $icons) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<a class="select-click" href="<?= $this->compact ? $hostLink : $this->href(
|
<a href="<?= $this->compact ? $hostLink : $this->href(
|
||||||
'monitoring/show/host',
|
'monitoring/show/host',
|
||||||
array('host' => $host->host_name)
|
array('host' => $host->host_name)
|
||||||
) ?>"><?= $host->host_name ?></a>
|
) ?>"><?= $host->host_name ?></a>
|
||||||
|
@ -99,7 +99,7 @@ foreach ($services as $service):
|
|||||||
<?php if ($service->service_icon_image && ! preg_match('/[\'"]/', $service->service_icon_image)): ?>
|
<?php if ($service->service_icon_image && ! preg_match('/[\'"]/', $service->service_icon_image)): ?>
|
||||||
<?= $this->icon($this->resolveMacros($service->service_icon_image, $service)) ?>
|
<?= $this->icon($this->resolveMacros($service->service_icon_image, $service)) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<a class="select-click" href="<?= $serviceLink ?>"><?= $service->service_display_name ?></a><?php if ($this->showHost): ?> on <a href="<?= $hostLink ?>"><?= $service->host_name; ?>
|
<a href="<?= $serviceLink ?>"><?= $service->service_display_name ?></a><?php if ($this->showHost): ?> on <a href="<?= $hostLink ?>"><?= $service->host_name; ?>
|
||||||
<?php if ($service->host_state != 0): ?>
|
<?php if ($service->host_state != 0): ?>
|
||||||
(<?= ucfirst($helper->monitoringState($service, 'host')); ?>)
|
(<?= ucfirst($helper->monitoringState($service, 'host')); ?>)
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -134,7 +134,6 @@
|
|||||||
|
|
||||||
// Select a table row
|
// Select a table row
|
||||||
$(document).on('click', 'table.multiselect tr[href]', { self: this }, this.rowSelected);
|
$(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);
|
$(document).on('click', 'button', { self: this }, this.submitForm);
|
||||||
|
|
||||||
@ -475,12 +474,20 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore clicks on multiselect table inner links while key pressed
|
// Special checks for link clicks in multiselect rows
|
||||||
if ((event.ctrlKey || event.metaKey || event.shiftKey) &&
|
if (! $a.is('tr[href]') && $a.closest('tr[href]').length > 0 && $a.closest('table.multiselect').length > 0) {
|
||||||
! $a.is('tr[href]') && $a.closest('table.multiselect').length > 0 &&
|
|
||||||
$a.closest('tr[href]').length > 0)
|
// Forward clicks to ANY link with special key pressed to rowSelected
|
||||||
{
|
if (event.ctrlKey || event.metaKey || event.shiftKey)
|
||||||
return self.rowSelected.call($a.closest('tr[href]'), event);
|
{
|
||||||
|
return self.rowSelected.call($a.closest('tr[href]'), event);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Forward inner links matching the row URL to rowSelected
|
||||||
|
if ($a.attr('href') === $a.closest('tr[href]').attr('href'))
|
||||||
|
{
|
||||||
|
return self.rowSelected.call($a.closest('tr[href]'), event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let remote links pass through
|
// Let remote links pass through
|
||||||
@ -494,6 +501,11 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ignore multiselect table row clicks
|
||||||
|
if ($a.closest('tr[href]').length > 0 && $a.closest('table.action').length > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// ignore multiselect table row clicks
|
// ignore multiselect table row clicks
|
||||||
if ($a.is('tr') && $a.closest('table.multiselect').length > 0) {
|
if ($a.is('tr') && $a.closest('table.multiselect').length > 0) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user