public static void SetupScriptsAndStyleSheets(Page Page, CalloutThemeName Theme, CalloutIconStyle IconStyle, string styleDirectory) { string scriptUrl = Page.ClientScript.GetWebResourceUrl(typeof(Combo), "Nitobi.scripts.nitobi.callout.js"); Page.ClientScript.RegisterClientScriptInclude("Nitobi.CalloutScript", scriptUrl); if (Page.Header != null && Theme != CalloutThemeName.None) { string appPath = Page.Request.ApplicationPath; string linkUrl = string.Format("{0}{1}{2}/nitobi.callout.css", appPath, appPath.Length == 1 ? "" : "/", styleDirectory); string csslink = "<link href='" + linkUrl + "' rel='stylesheet' type='text/css' ></link>"; setupPageCssLinks(Page, linkUrl, csslink); } }
protected internal static string calculatedClientStyleName(CalloutThemeName Theme, CalloutIconStyle IconStyle) { if (Theme != CalloutThemeName.Peanut) return Theme.ToString().ToLower(); if (IconStyle == CalloutIconStyle.None) return "peanut_talkbubble"; return "peanut_" + IconStyle.ToString().ToLower(); }
public static void SetupScriptsAndStyleSheets(Page Page, CalloutThemeName Theme, CalloutIconStyle IconStyle, string styleDirectory) { Callout.SetupScriptsAndStyleSheets(Page, Theme, IconStyle, styleDirectory); string scriptUrl = Page.ClientScript.GetWebResourceUrl(typeof(Spotlight), "Nitobi.scripts.nitobi.spotlight.js"); Page.ClientScript.RegisterClientScriptInclude("Nitobi.SpotlightScript", scriptUrl); //It appears that the spotlight css isnt used in the nitobi demo sites, but the callout is. //if (Page.Header != null && Theme != CalloutThemeName.None) //{ // string appPath = Page.Request.ApplicationPath; // string linkUrl = string.Format("{0}{1}NitobiStyles/callout/{2}/nitobi.callout.css", appPath, appPath.Length == 1 ? "" : "/", calculatedClientStyleName(Theme, IconStyle)); // string csslink = "<link href='" + linkUrl + "' rel='stylesheet' type='text/css' />"; // LiteralControl include = new LiteralControl(csslink); // Page.Header.Controls.Add(include); //} }