From 41d68f6a7417430991d34e27988ced05ecd8b45f Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Wed, 19 Aug 2015 16:36:47 +0200 Subject: [PATCH] Fix delete comments and downtimes button Fix faulty target names and add additional error checking in case the target DOM Element is not present. fixes #9330 --- .../monitoring/application/views/scripts/list/comments.phtml | 2 +- .../monitoring/application/views/scripts/list/downtimes.phtml | 2 +- public/js/icinga/events.js | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index 3287f08e9..44b452f42 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -67,7 +67,7 @@ ) : $this->translate('This comment does not expire.'); ?> - + populate( diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index 1125aa9ba..a45bd0499 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -126,7 +126,7 @@ if (! $this->compact): ?> - + populate( diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 71408d712..4b9576a5d 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -509,6 +509,9 @@ self.icinga.ui.layout1col(); } else { $target = $('#' + targetId); + if (! $target.length) { + self.icinga.logger.warn('Link target "#' + targetId + '" does not exist in DOM.'); + } } }