function Render($Part, $ColSpan = 1) { $tagclass = $this->Parent->TagClassName; if ($Part == "header") { if ($tagclass == "") { $tagclass = "ewListOptionHeader"; } $value = $this->Header; } elseif ($Part == "body") { if ($tagclass == "") { $tagclass = "ewListOptionBody"; } if ($this->Parent->Tag != "td") { ew_AppendClass($tagclass, "ewListOptionSeparator"); } $value = $this->Body; } elseif ($Part == "footer") { if ($tagclass == "") { $tagclass = "ewListOptionFooter"; } $value = $this->Footer; } else { $value = $Part; } if (strval($value) == "" && $this->Parent->Tag == "span" && $this->Parent->ScriptId == "") { return ""; } $res = $value != "" ? $value : " "; ew_AppendClass($tagclass, $this->CssClass); $attrs = array("class" => $tagclass, "style" => $this->CssStyle, "data-name" => $this->Name); if (strtolower($this->Parent->Tag) == "td" && $this->Parent->RowSpan > 1) { $attrs["rowspan"] = $this->Parent->RowSpan; } if (strtolower($this->Parent->Tag) == "td" && $ColSpan > 1) { $attrs["colspan"] = $ColSpan; } $name = $this->Parent->TableVar . "_" . $this->Name; if ($this->Name != $this->Parent->GroupOptionName) { if (!in_array($this->Name, array('checkbox', 'rowcnt'))) { if ($this->Parent->UseImageAndText) { $res = $this->GetImageAndText($res); } if ($this->Parent->UseButtonGroup && $this->ShowInButtonGroup) { $res = $this->Parent->RenderButtonGroup($res); if ($this->OnLeft && strtolower($this->Parent->Tag) == "td" && $ColSpan > 1) { $res = '<div style="text-align: right">' . $res . '</div>'; } } } if ($Part == "header") { $res = "<span id=\"elh_" . $name . "\" class=\"" . $name . "\">" . $res . "</span>"; } else { if ($Part == "body") { $res = "<span id=\"el" . $this->Parent->RowCnt . "_" . $name . "\" class=\"" . $name . "\">" . $res . "</span>"; } else { if ($Part == "footer") { $res = "<span id=\"elf_" . $name . "\" class=\"" . $name . "\">" . $res . "</span>"; } } } } $tag = $this->Parent->Tag == "td" && $Part == "header" ? "th" : $this->Parent->Tag; if ($this->Parent->UseButtonGroup && $this->ShowInButtonGroup) { $attrs["style"] .= "white-space: nowrap;"; } $res = ew_HtmlElement($tag, $attrs, $res); if ($this->Parent->ScriptId != "") { $js = ew_ExtractScript($res, $this->Parent->ScriptClassName . "_js"); if ($this->Parent->ScriptType == "single") { if ($Part == "header") { $res = "<script id=\"tpoh_" . $this->Parent->ScriptId . "_" . $this->Name . "\" type=\"text/html\">" . $res . "</script>"; } else { if ($Part == "body") { $res = "<script id=\"tpob" . $this->Parent->RowCnt . "_" . $this->Parent->ScriptId . "_" . $this->Name . "\" type=\"text/html\">" . $res . "</script>"; } else { if ($Part == "footer") { $res = "<script id=\"tpof_" . $this->Parent->ScriptId . "_" . $this->Name . "\" type=\"text/html\">" . $res . "</script>"; } } } } if ($js != "") { if ($this->Parent->ScriptType == "single") { $res .= $js; } else { $this->Parent->JavaScript .= $js; } } } return $res; }
function Render($aclass = "", $liclass = "", $mobile = FALSE) { // Create <A> $url = ew_GetUrl($this->Url); if (!is_null($this->SubMenu)) { $submenuhtml = $this->SubMenu->Render(TRUE); } else { $submenuhtml = ""; } if ($mobile) { $url = str_replace("#", "?chart=", $url); if ($url == "") { $url = "#"; } $attrs = array("class" => $aclass, "rel" => $url != "#" ? "external" : "", "href" => $url, "target" => $this->Target); } else { if ($url == "") { $url = "#"; } if (!is_null($this->SubMenu) && $this->SubMenu->MenuLinkDropdownClass != "" && $submenuhtml != "") { ew_PrependClass($aclass, $this->SubMenu->MenuLinkDropdownClass); } $attrs = array("class" => $aclass, "href" => $url, "target" => $this->Target); } $text = $this->Text; if (!is_null($this->SubMenu) && $submenuhtml != "") { if ($this->Parent->SubMenuDropdownIconClassName != "") { $text .= "<span class=\"" . $this->Parent->SubMenuDropdownIconClassName . "\"></span>"; } if ($this->Parent->SubMenuDropdownImage != "" && $this->ParentId == -1) { $text .= $this->Parent->SubMenuDropdownImage; } } $innerhtml = ew_HtmlElement("a", $attrs, $text); if (!is_null($this->SubMenu)) { if ($url != "#" && $this->SubMenu->MenuLinkClassName != "" && $submenuhtml != "") { // Add click link for mobile menu $attrs2 = array("class" => "ewMenuLink", "href" => $url); $text2 = "<span class=\"" . $this->SubMenu->MenuLinkClassName . "\"></span>"; $innerhtml = ew_HtmlElement("a", $attrs2, $text2) . $innerhtml; } if ($mobile && $this->Url != "#") { $innerhtml .= $innerhtml; } $innerhtml .= $submenuhtml; } // Create <LI> return ew_HtmlElement("li", array("id" => $this->Name, "class" => $liclass), $innerhtml); }
function Render($aclass = "", $liclass = "", $mobile = FALSE) { // Create <A> if ($mobile) { $attrs = array("class" => $aclass, "rel" => "external", "href" => str_replace("#", "?chart=", $this->Url), "target" => $this->Target); } else { $attrs = array("class" => $aclass, "href" => $this->Url, "target" => $this->Target); } $innerhtml = ew_HtmlElement("a", $attrs, $this->Text); if (!is_null($this->SubMenu)) { if ($mobile && $this->Url != "") { $innerhtml .= $innerhtml; } $innerhtml .= $this->SubMenu->Render(TRUE); } // Create <LI> return ew_HtmlElement("li", array("class" => $liclass), $innerhtml); }
function Render($aclass = "", $liclass = "", $mobile = FALSE) { // Create <A> $url = $this->Url; if ($mobile) { $url = str_replace("#", "?chart=", $url); if ($url == "") { $url = "#"; } $attrs = array("class" => $aclass, "rel" => $url != "#" ? "external" : "", "href" => $url, "target" => $this->Target); } else { if ($url == "") { $url = "#"; } $attrs = array("class" => $aclass, "href" => $url, "target" => $this->Target); } $text = $this->Text; if (!is_null($this->SubMenu) && $this->ParentId == -1 && EW_SUBMENU_DROPDOWN_IMAGE != "") { $text .= EW_SUBMENU_DROPDOWN_IMAGE; } $innerhtml = ew_HtmlElement("a", $attrs, $text); if (!is_null($this->SubMenu)) { if ($mobile && $this->Url != "") { $innerhtml .= $innerhtml; } $innerhtml .= $this->SubMenu->Render(TRUE); } // Create <LI> return ew_HtmlElement("li", array("class" => $liclass), $innerhtml); }
function Render($Part, $ColSpan = 1) { $tagclass = $this->Parent->TagClassName; if ($Part == "header") { if ($tagclass == "") { $tagclass = "ewListOptionHeader"; } $value = $this->Header; } elseif ($Part == "body") { if ($tagclass == "") { if ($this->Parent->Tag == "td") { $tagclass = "ewListOptionBody"; } else { $tagclass = "ewListOptionBody2"; } } $value = $this->Body; } elseif ($Part == "footer") { if ($tagclass == "") { $tagclass = "ewListOptionFooter"; } $value = $this->Footer; } else { $value = $Part; } if (strval($value) == "" && $this->Parent->Tag == "span" && $this->Parent->ScriptId == "") { return ""; } $res = $value != "" ? $value : " "; ew_AppendClass($tagclass, $this->CssClass); $attrs = array("class" => $tagclass, "style" => $this->CssStyle); if (strtolower($this->Parent->Tag) == "td" && $this->Parent->RowSpan > 1) { $attrs["rowspan"] = $this->Parent->RowSpan; } if (strtolower($this->Parent->Tag) == "td" && $ColSpan > 1) { $attrs["colspan"] = $ColSpan; } $name = $this->Parent->TableVar . "_" . $this->Name; if ($Part == "header") { $res = "<span id=\"elh_" . $name . "\" class=\"" . $name . "\">" . $res . "</span>"; } else { if ($Part == "body") { $res = "<span id=\"el" . $this->Parent->RowCnt . "_" . $name . "\" class=\"" . $name . "\">" . $res . "</span>"; } else { if ($Part == "footer") { $res = "<span id=\"elf_" . $name . "\" class=\"" . $name . "\">" . $res . "</span>"; } } } $res = ew_HtmlElement($this->Parent->Tag, $attrs, $res); if ($this->Parent->ScriptId != "") { $js = ew_ExtractScript($res, $this->Parent->ScriptClassName . "_js"); if ($this->Parent->ScriptType == "single") { if ($Part == "header") { $res = "<script id=\"tpoh_" . $this->Parent->ScriptId . "_" . $this->Name . "\" type=\"text/html\">" . $res . "</script>"; } else { if ($Part == "body") { $res = "<script id=\"tpob" . $this->Parent->RowCnt . "_" . $this->Parent->ScriptId . "_" . $this->Name . "\" type=\"text/html\">" . $res . "</script>"; } else { if ($Part == "footer") { $res = "<script id=\"tpof_" . $this->Parent->ScriptId . "_" . $this->Name . "\" type=\"text/html\">" . $res . "</script>"; } } } } if ($js != "") { if ($this->Parent->ScriptType == "single") { $res .= $js; } else { $this->Parent->JavaScript .= $js; } } } return $res; }