provide ability to override entire content of Window
This commit is contained in:
parent
5214c5d20e
commit
bc40da48be
@ -23,6 +23,11 @@
|
|||||||
public $ContentControls;
|
public $ContentControls;
|
||||||
public $FooterControls;
|
public $FooterControls;
|
||||||
|
|
||||||
|
|
||||||
|
public $Content;
|
||||||
|
|
||||||
|
private $__Content;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
@ -30,6 +35,7 @@
|
|||||||
$this->TagName = "div";
|
$this->TagName = "div";
|
||||||
$this->ClassList[] = "Window";
|
$this->ClassList[] = "Window";
|
||||||
$this->ParseChildElements = true;
|
$this->ParseChildElements = true;
|
||||||
|
$this->__Content = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function OnInitialize()
|
protected function OnInitialize()
|
||||||
@ -40,6 +46,9 @@
|
|||||||
|
|
||||||
protected function RenderBeginTag()
|
protected function RenderBeginTag()
|
||||||
{
|
{
|
||||||
|
$this->__Content = $this->Content;
|
||||||
|
$this->Content = null;
|
||||||
|
|
||||||
switch($this->HorizontalAlignment)
|
switch($this->HorizontalAlignment)
|
||||||
{
|
{
|
||||||
case HorizontalAlignment::Left:
|
case HorizontalAlignment::Left:
|
||||||
@ -89,11 +98,18 @@
|
|||||||
|
|
||||||
$divInnerContent = new HTMLControl("div");
|
$divInnerContent = new HTMLControl("div");
|
||||||
$divInnerContent->ClassList[] = "Content";
|
$divInnerContent->ClassList[] = "Content";
|
||||||
foreach ($this->ContentControls as $ctl)
|
if ($this->__Content !== null)
|
||||||
{
|
{
|
||||||
$divInnerContent->Controls[] = $ctl;
|
$divInnerContent->Content = $this->__Content;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach ($this->ContentControls as $ctl)
|
||||||
|
{
|
||||||
|
$divInnerContent->Controls[] = $ctl;
|
||||||
|
}
|
||||||
|
$divContent->Controls[] = $divInnerContent;
|
||||||
}
|
}
|
||||||
$divContent->Controls[] = $divInnerContent;
|
|
||||||
|
|
||||||
$divLoading = new HTMLControl("div");
|
$divLoading = new HTMLControl("div");
|
||||||
$divLoading->ClassList[] = "Loading";
|
$divLoading->ClassList[] = "Loading";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user