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
This commit is contained in:
Matthias Jentsch 2015-08-19 16:36:47 +02:00
parent 9e40f5f2c7
commit 41d68f6a74
3 changed files with 5 additions and 2 deletions

View File

@ -67,7 +67,7 @@
) : $this->translate('This comment does not expire.'); ?>
</td>
<?php if (isset($delCommentForm)): // Form is unset if the current user lacks the respective permission ?>
<td style="width: 2em" data-base-target="self">
<td style="width: 2em" data-base-target="_self">
<?php
$delCommentForm = clone $delCommentForm;
$delCommentForm->populate(

View File

@ -126,7 +126,7 @@ if (! $this->compact): ?>
</small>
</td>
<?php if (isset($delDowntimeForm)): // Form is unset if the current user lacks the respective permission ?>
<td style="width: 2em" data-base-target="self">
<td style="width: 2em" data-base-target="_self">
<?php
$delDowntimeForm = clone $delDowntimeForm;
$delDowntimeForm->populate(

View File

@ -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.');
}
}
}