diff --git a/lib/phast/server/System.inc.php b/lib/phast/server/System.inc.php
index 620d1c5..0e20405 100644
--- a/lib/phast/server/System.inc.php
+++ b/lib/phast/server/System.inc.php
@@ -879,6 +879,7 @@
$escape = false;
$insideVariable = false;
+ $vars = [ ];
$varname = null;
$varvalue = null;
@@ -983,7 +984,6 @@
$varvalue = null;
}
return $vars;
-
}
private static function __ReplaceAny($str, $before, $after, $with)
@@ -1096,9 +1096,12 @@
if (System::ParsePathVariablesIntoPage( $actualPage, $pathVars ))
{
- foreach ($pathVars as $key => $value)
+ if (is_array($pathVars))
{
- $actualPage->PathVariables[] = new WebVariable($key, $value);
+ foreach ($pathVars as $key => $value)
+ {
+ $actualPage->PathVariables[] = new WebVariable($key, $value);
+ }
}
System::$CurrentPage = $actualPage;
diff --git a/lib/phast/server/WebControls/AdditionalDetailWidget.inc.php b/lib/phast/server/WebControls/AdditionalDetailWidget.inc.php
index bc74c09..d18d790 100644
--- a/lib/phast/server/WebControls/AdditionalDetailWidget.inc.php
+++ b/lib/phast/server/WebControls/AdditionalDetailWidget.inc.php
@@ -139,7 +139,7 @@
}
else
{
- echo ("" . $this->Text . "");
+ echo ("" . $this->Text . "");
}
}
diff --git a/lib/phast/server/WebControls/Button.inc.php b/lib/phast/server/WebControls/Button.inc.php
index c45aad0..ce236f7 100644
--- a/lib/phast/server/WebControls/Button.inc.php
+++ b/lib/phast/server/WebControls/Button.inc.php
@@ -48,6 +48,7 @@
protected function RenderBeginTag()
{
+ /*
if ($this->UseSubmitBehavior)
{
$tag = new Input();
@@ -124,7 +125,36 @@
$divDropDown->ClassList[] = "pwt-DropDownContent Popup";
$divDropDown->Controls = $this->DropDownControls;
$this->Controls[] = $divDropDown;
-
+ */
+ if (count($this->DropDownControls) > 0)
+ {
+ $this->ClassList[] = "uwt-button-hasdropdown";
+ }
+ if ($this->DropDownRequired)
+ {
+ $this->ClassList[] = "uwt-button-requiredropdown";
+ }
+
+ /*
+ $buttonElement = new WebControl();
+ $buttonElement->TagName = "button";
+ */
+
+ $spanText = new WebControl();
+ $spanText->TagName = "span";
+ $spanText->ClassList[] = "uwt-title";
+ $spanText->Content = $this->Text;
+ // $buttonElement->Controls[] = $spanText;
+ $this->Controls[] = $spanText;
+
+ //$this->Controls[] = $buttonElement;
+
+ $buttonElement = new WebControl();
+ $buttonElement->TagName = "button";
+ $buttonElement->ClassList[] = "uwt-button-dropdownbutton";
+
+ $this->Controls[] = $buttonElement;
+
parent::RenderBeginTag();
}
}
diff --git a/lib/phast/server/WebPage.inc.php b/lib/phast/server/WebPage.inc.php
index 27b4111..bbcdc59 100644
--- a/lib/phast/server/WebPage.inc.php
+++ b/lib/phast/server/WebPage.inc.php
@@ -265,11 +265,21 @@
foreach ($tagStyleSheets->Elements as $elem)
{
if (get_class($elem) != "UniversalEditor\\ObjectModels\\Markup\\MarkupTagElement") continue;
-
+
+ $content = null;
$attFileName = $elem->GetAttribute("FileName");
- if ($attFileName == null) continue;
-
- $page->StyleSheets[] = new WebStyleSheet($attFileName->Value);
+ $ss = new WebStyleSheet("");
+ if ($attFileName == null)
+ {
+ $content = $elem->GetInnerMarkup();
+ }
+ else
+ {
+ $ss->FileName = $attFileName->Value;
+ }
+ $ss->Content = $content;
+ $page->StyleSheets[] = $ss;
+
}
}
$tagVariables = $element->GetElement("ClientVariables");
@@ -454,6 +464,24 @@
}
return $tag;
}
+ public static function CreateStyleTag(WebStyleSheet $stylesheet)
+ {
+ $tag= new HTMLControl();
+ $tag->TagName = "style";
+ if ($stylesheet->ContentType != "")
+ {
+ $tag->Attributes[] = new WebControlAttribute("type", $stylesheet->ContentType);
+ }
+ else
+ {
+ $tag->Attributes[] = new WebControlAttribute("type", "text/css");
+ }
+ if ($stylesheet->Content != "")
+ {
+ $tag->InnerHTML = $stylesheet->Content;
+ }
+ return $tag;
+ }
/**
* Creates the style sheet tag for the given style sheet.
* @param WebStyleSheet $stylesheet
@@ -461,6 +489,10 @@
*/
public static function CreateStyleSheetTag(WebStyleSheet $stylesheet)
{
+ if ($stylesheet->FileName == "")
+ {
+ return WebPage::CreateStyleTag($stylesheet);
+ }
return WebPage::CreateResourceLinkTag(new WebResourceLink($stylesheet->FileName, "stylesheet", (($stylesheet->ContentType == "") ? "text/css" : $stylesheet->ContentType)));
}
diff --git a/lib/phast/server/WebStyleSheet.inc.php b/lib/phast/server/WebStyleSheet.inc.php
index d1084f8..32bc5e9 100644
--- a/lib/phast/server/WebStyleSheet.inc.php
+++ b/lib/phast/server/WebStyleSheet.inc.php
@@ -5,7 +5,8 @@
{
public $ContentType;
public $FileName;
-
+ public $Content;
+
public function __construct($FileName, $ContentType = "text/css")
{
$this->FileName = $FileName;