Modified:
trunk/Classes/Phaux-base/WHComponent.php
trunk/Classes/Phaux-base/WHModelDecoration.php
Log:
Include child component of decorations in the render tree and fix WHModelDecoration
Modified: trunk/Classes/Phaux-base/WHComponent.php
==============================================================================
--- trunk/Classes/Phaux-base/WHComponent.php (original)
+++ trunk/Classes/Phaux-base/WHComponent.php Wed Oct 10 12:03:46 2007
@@ -256,7 +256,8 @@
$return .= $this->thisOrDialog()->styleOfDecorations();
}
foreach($this->decorations as $decoration){
- $return .= $decoration->style();
+ $return .= $decoration->styleOfThisAndChildren();
+
}
return $return;
}
Modified: trunk/Classes/Phaux-base/WHModelDecoration.php
==============================================================================
--- trunk/Classes/Phaux-base/WHModelDecoration.php (original)
+++ trunk/Classes/Phaux-base/WHModelDecoration.php Wed Oct 10 12:03:46 2007
@@ -8,10 +8,7 @@
class WHModelDecoration extends WHDecoration {
- public function children(){
- return array($this->decoratedComponent->parentComponent);
- }
-
+
public function renderChildComponentOn($html){
/*
**Ok kids don't try any of this at home.
@@ -53,6 +50,14 @@
addToCallStack(window, "onresize", updateModelBox);
addLoadEvent(updateModelBox);
';
+ }
+
+ public function style(){
+ return $this->decoratedComponent->parentComponent->style();
+ }
+
+ public function script(){
+ return $this->decoratedComponent->parentComponent->script();
}
}