ClassTitle = ""; $this->DisplayStyle = AdditionalDetailWidgetDisplayStyle::Ellipsis; $this->MenuItemHeaderText = "Available Actions"; $this->MenuItems = array(); $this->ShowText = true; $this->ShowURL = true; } private function RenderMenuItem($mi) { if (get_class($mi) == "Phast\\WebControls\\MenuItemCommand") { echo("PostBackUrl == "") { echo("#"); } else { echo(System::ExpandRelativePath($mi->PostBackUrl)); } echo("\""); if ($mi->OnClientClick != "") { echo(" onclick=\"" . $mi->OnClientClick . "\""); } echo(">"); echo($mi->Title); echo(""); } else if (get_class($mi) == "Phast\\WebControls\\MenuItemSeparator") { echo("
"); } } protected function OnInitialize() { $this->TagName = "div"; $this->ClassList[] = "uwt-actionpreviewbutton"; if ($this->ShowText) { $this->ClassList[] = "apb-show-text"; } switch ($this->DisplayStyle) { case AdditionalDetailWidgetDisplayStyle::Magnify: { $this->ClassList[] = "apb-style-magnify"; break; } case AdditionalDetailWidgetDisplayStyle::Arrow: { $this->ClassList[] = "apb-style-arrow"; break; } case AdditionalDetailWidgetDisplayStyle::Ellipsis: { $this->ClassList[] = "apb-style-ellipsis"; break; } } } private function renderMainLink() { if ($this->ShowURL) { echo("TargetURL != "") { echo(System::ExpandRelativePath($this->TargetURL)); } else { echo("#"); } echo("\""); if ($this->TargetFrame != "") { echo(" target=\"" . $this->TargetFrame . "\""); } echo(">"); echo($this->Text); echo(""); } else { echo ("" . $this->Text . ""); } } protected function BeforeContent() { $this->renderMainLink(); echo(" "); echo("
"); echo("
MenuItems) <= 0) { echo(" uwt-empty"); } echo("\">"); echo("

" . $this->MenuItemHeaderText . "

"); $menu = new Menu(); foreach ($this->MenuItems as $mi) { if (is_array($mi->Items) && count($mi->Items) > 0) { $mi->ClassList[] = "uwt-menu-item-popup"; } $mi->SubmenuClasslist[] = "uwt-popup"; $menu->Items[] = $mi; } $menu->Render(); echo("
"); echo("
"); echo("
"); echo("

"); echo("" . $this->ClassTitle . ""); $this->renderMainLink(); echo("

"); echo("
"); echo("
"); } protected function AfterContent() { echo("
"); echo("
"); echo("
 
"); echo("
"); } } ?>