ensure the main links render the same in the inline and the preview

This commit is contained in:
Michael Becker 2024-01-08 02:01:00 -05:00
parent 24d3f87e29
commit 6e1edfea9a
2 changed files with 11 additions and 19 deletions

View File

@ -102,7 +102,7 @@
} }
} }
protected function BeforeContent() private function renderMainLink()
{ {
if ($this->ShowURL) if ($this->ShowURL)
{ {
@ -130,6 +130,11 @@
{ {
echo ("<span class=\"apb-text\">" . $this->Text . "</span>"); echo ("<span class=\"apb-text\">" . $this->Text . "</span>");
} }
}
protected function BeforeContent()
{
$this->renderMainLink();
echo("<a class=\"apb-button\" href=\"#\" tabindex=\"-1\">&nbsp;</a>"); echo("<a class=\"apb-button\" href=\"#\" tabindex=\"-1\">&nbsp;</a>");
@ -162,20 +167,7 @@
echo("<h2>"); echo("<h2>");
echo("<span class=\"apb-class-title\">" . $this->ClassTitle . "</span>"); echo("<span class=\"apb-class-title\">" . $this->ClassTitle . "</span>");
echo("<a href=\""); $this->renderMainLink();
if ($this->PostBackURL != "")
{
echo($this->PostBackURL);
}
else
{
echo("#");
}
echo("\"");
echo(">");
echo($this->Text);
echo("</a>");
echo("</h2>"); echo("</h2>");
echo("</div>"); echo("</div>");

View File

@ -36,7 +36,7 @@
parent::__construct(); parent::__construct();
$this->TagName = "div"; $this->TagName = "div";
$this->ClassList[] = "pwt-Button"; $this->ClassList[] = "uwt-button";
$this->DropDownControls = array(); $this->DropDownControls = array();
$this->DropDownRequired = false; $this->DropDownRequired = false;
@ -54,7 +54,7 @@
foreach ($this->ClassList as $className) foreach ($this->ClassList as $className)
{ {
if ($className == "pwt-Button") continue; if ($className == "uwt-button") continue;
$tag->ClassList[] = $className; $tag->ClassList[] = $className;
} }
@ -116,7 +116,7 @@
} }
$aDropDown = new Anchor(); $aDropDown = new Anchor();
$aDropDown->ClassList[] = "pwt-Button pwt-DropDownButton"; $aDropDown->ClassList[] = "uwt-button pwt-DropDownButton";
$aDropDown->InnerHTML = "&nbsp;"; $aDropDown->InnerHTML = "&nbsp;";
$this->Controls[] = $aDropDown; $this->Controls[] = $aDropDown;