diff --git a/lib/phast/server/WebControls/Window.inc.php b/lib/phast/server/WebControls/Window.inc.php index d4c1f42..36f309c 100644 --- a/lib/phast/server/WebControls/Window.inc.php +++ b/lib/phast/server/WebControls/Window.inc.php @@ -22,6 +22,11 @@ public $HeaderControls; public $ContentControls; public $FooterControls; + + + public $Content; + + private $__Content; public function __construct() { @@ -30,6 +35,7 @@ $this->TagName = "div"; $this->ClassList[] = "Window"; $this->ParseChildElements = true; + $this->__Content = null; } protected function OnInitialize() @@ -40,6 +46,9 @@ protected function RenderBeginTag() { + $this->__Content = $this->Content; + $this->Content = null; + switch($this->HorizontalAlignment) { case HorizontalAlignment::Left: @@ -89,11 +98,18 @@ $divInnerContent = new HTMLControl("div"); $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->ClassList[] = "Loading";