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($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; }