public static void RenderInfoMessage(TextWriter output, InfobarMessage infobarMessage) { if (output == null) { throw new ArgumentNullException("output"); } if (infobarMessage == null) { throw new ArgumentNullException("infobarMessage"); } output.Write("<div class=\"w100\""); if (!string.IsNullOrEmpty(infobarMessage.TagId)) { output.Write(" id=\""); Utilities.SanitizeHtmlEncode(infobarMessage.TagId, output); output.Write("\""); } output.Write(">"); if (infobarMessage.Type == InfobarMessageType.Error || infobarMessage.IsActionResult) { output.Write("<h1>"); } infobarMessage.RenderMessageString(output); if (infobarMessage.Type == InfobarMessageType.Error || infobarMessage.IsActionResult) { output.Write("</h1>"); } output.Write("</div>"); }
private static void RenderExpandingMessage(TextWriter output, InfobarMessage infobarMessage, bool isVerticalSpaceRequired) { output.Write("<div class=\"iem"); if (isVerticalSpaceRequired) { output.Write(" vsp"); } output.Write("\">"); infobarMessage.RenderMessageString(output); output.Write("</div>"); output.Write("<div id=divIbE{0}>", infobarMessage.IsExpanding ? string.Empty : " style=\"display:none\""); output.Write(infobarMessage.ExpandSectionHtml); output.Write("</div>"); }
private static void RenderPromptMessage(TextWriter output, InfobarMessage infobarMessage) { output.Write("<table cellpadding=\"0\" cellspacing=\"0\" class=\"w100\"><tr><td>"); output.Write("<div id=\"divIbPm\"><span class=\"vam\"><h1 tabindex=0> "); infobarMessage.RenderMessageString(output); output.Write("</h1></span></div>"); if (!SanitizedStringBase <OwaHtml> .IsNullOrEmpty(infobarMessage.BodyHtml)) { output.Write("<table cellpadding=\"4\" cellspacing=\"4\" class=\"w100\"><tr><td class=\"ibsubbox\">"); output.Write(infobarMessage.BodyHtml); output.Write("</td></tr>"); output.Write("</table>"); } if (!SanitizedStringBase <OwaHtml> .IsNullOrEmpty(infobarMessage.FooterHtml)) { output.Write("<tr><td><div id=\"divIbPb\" tabindex=0>"); output.Write(infobarMessage.FooterHtml); output.Write("</div></td></tr>"); } output.Write("</td></tr></table>"); }