bring everything into line with mocha
This commit is contained in:
parent
d99b1317ea
commit
413cf121c3
@ -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;
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo ("<a class=\"apb-text apb-empty\" href=\"\">" . $this->Text . "</a>");
|
||||
echo ("<a class=\"apb-text apb-empty\" tabindex=\"-1\">" . $this->Text . "</a>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,6 +48,7 @@
|
||||
|
||||
protected function RenderBeginTag()
|
||||
{
|
||||
/*
|
||||
if ($this->UseSubmitBehavior)
|
||||
{
|
||||
$tag = new Input();
|
||||
@ -124,6 +125,35 @@
|
||||
$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();
|
||||
}
|
||||
|
||||
@ -266,10 +266,20 @@
|
||||
{
|
||||
if (get_class($elem) != "UniversalEditor\\ObjectModels\\Markup\\MarkupTagElement") continue;
|
||||
|
||||
$content = null;
|
||||
$attFileName = $elem->GetAttribute("FileName");
|
||||
if ($attFileName == null) continue;
|
||||
$ss = new WebStyleSheet("");
|
||||
if ($attFileName == null)
|
||||
{
|
||||
$content = $elem->GetInnerMarkup();
|
||||
}
|
||||
else
|
||||
{
|
||||
$ss->FileName = $attFileName->Value;
|
||||
}
|
||||
$ss->Content = $content;
|
||||
$page->StyleSheets[] = $ss;
|
||||
|
||||
$page->StyleSheets[] = new WebStyleSheet($attFileName->Value);
|
||||
}
|
||||
}
|
||||
$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)));
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
{
|
||||
public $ContentType;
|
||||
public $FileName;
|
||||
public $Content;
|
||||
|
||||
public function __construct($FileName, $ContentType = "text/css")
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user