private void RenderOpenItem(jStringBuilder sb) {
bool renderCss = this.Menu.Rendering.RenderCSS;
sb.AppendTabsFormat("<{0}", this.Tag);
if (this.IsDivider) {
if (renderCss)
this.AddCssClass("ui-widget-content ui-menu-divider");
this.RenderAttributes(sb);
sb.Append(">");
return;
}
if (renderCss)
this.AddCssClass("ui-menu-item");
if (this.IsDisabled)
this.AddCssClass("ui-state-disabled");
this.RenderAttributes(sb);
sb.Append(">");
if (!string.IsNullOrEmpty(this.Html))
sb.Append(this.Html);
else {
if (!string.IsNullOrEmpty(this.TargetURL))
sb.AppendFormat("<a href=\"{0}\"", this.TargetURL);
else
sb.AppendFormat("<a href=\"#\"");
if (renderCss)
sb.Append(" class=\"ui-corner-all\"");
sb.Append(">");
if (!string.IsNullOrEmpty(this.Icon)) {
sb.AppendFormat("<span class=\"ui-icon {0}\"></span>", this.Icon);
}
// Title is mandatory when not using the HTML version
sb.Append(this.Title);
sb.Append("</a>");
}
}