mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
JS-less iFrame rendering improvements
This commit is contained in:
parent
54175f98bf
commit
83b26bc595
@ -76,7 +76,7 @@ class Component extends AbstractWidget
|
|||||||
<div class="container" data-icinga-url="{URL}">
|
<div class="container" data-icinga-url="{URL}">
|
||||||
<h1>{REMOVE}<a href="{FULL_URL}" data-base-target="col1">{TITLE}</a></h1>
|
<h1>{REMOVE}<a href="{FULL_URL}" data-base-target="col1">{TITLE}</a></h1>
|
||||||
<noscript>
|
<noscript>
|
||||||
<iframe src="{URL}" style="height:100%; width:99%" frameborder="no"></iframe>
|
<iframe src="{IFRAME_URL}" style="height:100%; width:99%" frameborder="no"></iframe>
|
||||||
</noscript>
|
</noscript>
|
||||||
</div>
|
</div>
|
||||||
EOD;
|
EOD;
|
||||||
@ -165,8 +165,11 @@ EOD;
|
|||||||
$view = $this->view();
|
$view = $this->view();
|
||||||
$url = clone($this->url);
|
$url = clone($this->url);
|
||||||
$url->addParams(array('view' => 'compact'));
|
$url->addParams(array('view' => 'compact'));
|
||||||
|
$iframeUrl = clone($url);
|
||||||
|
$iframeUrl->addParams(array('_render' => 'iframe'));
|
||||||
|
|
||||||
$html = str_replace('{URL}', $url, $this->template);
|
$html = str_replace('{URL}', $url, $this->template);
|
||||||
|
$html = str_replace('{IFRAME_URL}', $iframeUrl, $html);
|
||||||
$html = str_replace('{FULL_URL}', $url->getUrlWithout('view'), $html);
|
$html = str_replace('{FULL_URL}', $url->getUrlWithout('view'), $html);
|
||||||
$html = str_replace('{REMOVE_BTN}', $this->getRemoveForm($view), $html);
|
$html = str_replace('{REMOVE_BTN}', $this->getRemoveForm($view), $html);
|
||||||
$html = str_replace('{TITLE}', $view->escape($this->getTitle()), $html);
|
$html = str_replace('{TITLE}', $view->escape($this->getTitle()), $html);
|
||||||
@ -181,6 +184,8 @@ EOD;
|
|||||||
*/
|
*/
|
||||||
protected function getRemoveForm()
|
protected function getRemoveForm()
|
||||||
{
|
{
|
||||||
|
// TODO: temporarily disabled, should point to a form asking for confirmal
|
||||||
|
return '';
|
||||||
$removeUrl = Url::fromPath(
|
$removeUrl = Url::fromPath(
|
||||||
'/dashboard/removecomponent',
|
'/dashboard/removecomponent',
|
||||||
array(
|
array(
|
||||||
|
@ -35,6 +35,17 @@ html {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.iframe {
|
||||||
|
#header, #sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main {
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#responsive-debug {
|
#responsive-debug {
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
font-family: Courier new, monospace;
|
font-family: Courier new, monospace;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user