mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 12:54:26 +02:00
Add support for server-side triggered CSS reload
This commit is contained in:
parent
87f90b6bdd
commit
eeaec20873
@ -68,6 +68,8 @@ class ActionController extends Zend_Controller_Action
|
|||||||
|
|
||||||
private $noXhrBody = false;
|
private $noXhrBody = false;
|
||||||
|
|
||||||
|
private $reloadCss = false;
|
||||||
|
|
||||||
private $windowId;
|
private $windowId;
|
||||||
|
|
||||||
// TODO: This would look better if we had a ModuleActionController
|
// TODO: This would look better if we had a ModuleActionController
|
||||||
@ -149,6 +151,11 @@ class ActionController extends Zend_Controller_Action
|
|||||||
return $this->windowId;
|
return $this->windowId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function reloadCss()
|
||||||
|
{
|
||||||
|
$this->reloadCss = true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a window-aware session by using the given prefix
|
* Return a window-aware session by using the given prefix
|
||||||
*
|
*
|
||||||
@ -370,6 +377,10 @@ class ActionController extends Zend_Controller_Action
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($isXhr && ($this->reloadCss || $this->getParam('_reload') === 'css')) {
|
||||||
|
header('X-Icinga-CssReload: now');
|
||||||
|
}
|
||||||
|
|
||||||
if ($isXhr && $this->noXhrBody) {
|
if ($isXhr && $this->noXhrBody) {
|
||||||
header('X-Icinga-Container: ignore');
|
header('X-Icinga-Container: ignore');
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user