Merge pull request #3273 from Icinga/bugfix/iframe-dashboard

Improve rendering of iframes in the dashboard
This commit is contained in:
lippserd 2018-01-22 09:42:25 +01:00 committed by GitHub
commit d0aa39007a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -1,4 +1,8 @@
<?php if (! $compact): ?>
<div class="controls">
<?= $tabs ?>
</div>
<iframe src="<?= $this->escape($url) ?>" style="height:99%; width:99%;" frameborder="no"></iframe>
<?php endif ?>
<div class="iframe-container">
<iframe src="<?= $this->escape($url) ?>" frameborder="no"></iframe>
</div>

View File

@ -215,3 +215,21 @@ a:hover > .icon-cancel {
height: 100%;
vertical-align: middle;
}
// Responsive iFrames
.iframe-container {
position: relative;
height: 0;
overflow: hidden;
padding-bottom: 75%;
width: 100%;
& > iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
}