本文整理汇总了C#中Fluqi.Extension.Helpers.jStringBuilder.AppendTabsFormatIf方法的典型用法代码示例。如果您正苦于以下问题:C# jStringBuilder.AppendTabsFormatIf方法的具体用法?C# jStringBuilder.AppendTabsFormatIf怎么用?C# jStringBuilder.AppendTabsFormatIf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fluqi.Extension.Helpers.jStringBuilder
的用法示例。
在下文中一共展示了jStringBuilder.AppendTabsFormatIf方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTagHtml
/// <summary>
/// Renders the panel header and returns the HTML
/// </summary>
/// <returns></returns>
internal string GetTagHtml() {
Accordion ac = this.OnPanel.OnAccordion;
bool prettyRender = ac.Rendering.PrettyRender;
bool renderCss = ac.Rendering.RenderCSS;
int tabDepth = ac.Rendering.TabDepth;
jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth + 1);
// H3 tag (or whatever if it's been overridden in the options)
sb.AppendLineIf();
sb.AppendTabsFormatIf("<{0}", ac.Options.HeadingTag);
if (renderCss) {
base.WithCss("ui-accordion-header ui-helper-reset ui-state-default");
if (this.OnPanel.IsActive)
base.WithCss("ui-state-active ui-corner-top");
else
base.WithCss("ui-corner-all");
}
// add in any attributes the user has added
base.RenderAttributes(sb);
// and close off the starting H3 tag
sb.Append(">");
sb.Append(this.OnPanel.Title);
// Closing heading (H3)
sb.AppendFormatLineIf("</{0}>", ac.Options.HeadingTag);
return sb.ToString();
}
示例2: GetTagHtml
/// <summary>
/// Renders the HTML for the hyperlink.
/// </summary>
/// <returns>String of HTML</returns>
public string GetTagHtml() {
Accordion ac = this._Header.OnPanel.OnAccordion;
bool prettyRender = ac.Rendering.PrettyRender;
bool renderCss = ac.Rendering.RenderCSS;
int tabDepth = ac.Rendering.TabDepth;
jStringBuilder sb = new jStringBuilder(prettyRender, tabDepth);
sb.AppendTabsFormatIf("<a href=\"{0}\">", this.URL);
base.RenderAttributes(sb);
sb.Append(this.Title);
sb.Append("</a>");
return sb.ToString();
}
示例3: GetControlScript
} // Render
/// <summary>
/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
/// a defined.
/// </summary>
/// <param name="tabDepth">
/// How far to indent the script code setting.
/// </param>
/// <returns>
/// Returns rendered initialisation script
/// </returns>
protected internal string GetControlScript(int tabDepth) {
jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
sb.IncIndent();
sb.AppendTabsFormatIf("$(\"#{0}\").autocomplete(", this.ID);
Core.ScriptOptions options = new Core.ScriptOptions();
this.Options.DiscoverOptions(options);
this.Events.DiscoverOptions(options);
options.Render(sb);
sb.Append(");");
sb.DecIndent();
return sb.ToString();
}
示例4: RenderBody
/// <summary>
/// Renders the body of the accordion panel.
/// </summary>
/// <param name="sb">StringBuilder to render the object to</param>
internal void RenderBody(jStringBuilder sb) {
bool renderCss = this.OnAccordion.Rendering.RenderCSS;
// Opening pane container div
sb.AppendTabsFormatIf("<{0}", this.OnAccordion.Options.ContentTag);
base.RenderAttributes(sb);
if (renderCss) {
sb.Append(" class=\"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
// may seem strange, but when renderCss is on, we always need the "ui-accordion-content-active"
// presented otherwise the panel will be collapsed (hidden) and if JavaScript isn't on, the user
// will have no way of seeing the content !
sb.Append(" ui-accordion-content-active");
sb.Append("\"");
}
sb.Append(">");
sb.AppendLineIf();
}
示例5: GetControlScript
/// <summary>
/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
/// a defined.
/// </summary>
/// <param name="tabDepth">
/// How far to indent the script code setting.
/// </param>
/// <returns>
/// Returns rendered initialisation script
/// </returns>
protected internal string GetControlScript(int tabDepth) {
jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
string selector = "";
if (IsGlobal())
selector = Options.DEFAULT_TARGET;
else
selector = string.Format("\"#{0}\"", this.ID);
sb.IncIndent();
sb.AppendTabsFormatIf("$({0}).tooltip(", selector);
Core.ScriptOptions options = new Core.ScriptOptions();
this.Options.DiscoverOptions(options);
this.Events.DiscoverOptions(options);
options.Render(sb);
sb.Append(");");
sb.DecIndent();
return sb.ToString();
}
示例6: RenderBody
/// <summary>
/// Renders the body of the accordion panel.
/// </summary>
/// <param name="sb">StringBuilder to render the object to</param>
internal void RenderBody(jStringBuilder sb) {
bool renderCss = this.OnAccordion.Rendering.RenderCSS;
// Opening pane container div
sb.AppendTabsFormatIf("<{0}", this.OnAccordion.Options.ContentTag);
base.RenderAttributes(sb);
if (renderCss) {
sb.Append(" class=\"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
if (this.IsActive)
sb.Append(" ui-accordion-content-active");
sb.Append("\"");
}
sb.Append(">");
sb.AppendLineIf();
}
示例7: GetControlScript
/// <summary>
/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
/// a defined.
/// </summary>
/// <param name="tabDepth">
/// How far to indent the script code (see <see cref="Core.Rendering.PrettyRender"/> setting.
/// </param>
/// <returns>
/// Returns rendered initialisation script
/// </returns>
public string GetControlScript(int tabDepth) {
jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
sb.IncIndent();
sb.AppendTabsFormatIf("$.ajax(", this.ID);
Core.ScriptOptions options = new Core.ScriptOptions();
this.Options.DiscoverOptions(options);
options.Render(sb);
sb.Append(");");
sb.DecIndent();
return sb.ToString();
}
示例8: GetControlScript
/// <summary>
/// Writes out the calling script for the jQuery Tabs plugin, adding options that have been
/// a defined.
/// </summary>
/// <param name="tabDepth">
/// How far to indent the script code setting.
/// </param>
/// <returns>
/// Returns rendered initialisation script
/// </returns>
protected internal string GetControlScript(int tabDepth) {
jStringBuilder sb = new jStringBuilder(this.Rendering.PrettyRender, this.Rendering.TabDepth);
sb.IncIndent();
sb.AppendTabsFormatIf("$(\"#{0}\").button(", this.ID);
Core.ScriptOptions options = new Core.ScriptOptions();
this.Options.DiscoverOptions(options);
this.Events.DiscoverOptions(options);
options.Render(sb);
sb.Append(");");
if (!string.IsNullOrEmpty(this.Events.ClickEvent)) {
// as ClickEvent isn't a "real" jQuery UI button event, it has to be wired up separately
sb.AppendLineIf();
sb.AppendTabsFormatLineIf("$(\"#{0}\").click(function() {{", this.ID);
sb.Append(this.Events.ClickEvent);
sb.AppendLineIf();
sb.AppendTabsLineIf("});");
}
sb.DecIndent();
return sb.ToString();
}