예제 #1
0
        public static HtmlHelper RequiresThemedCssFolder(this HtmlHelper html, IMasterModel model)
        {
            return(html.RequiresFolder(PathHelper.GetThemePath(model) + "Assets/css",
                                       100, "*.css", (absPath, pri) => html.RequiresCss(absPath, pri)));

            //TODO: As per below, when latest CDF is releaesd and bundled we don't have to do this
            //return html.RequiresCssFolder(PathHelper.GetThemePath(model) + "Assets/css");
        }
예제 #2
0
 public static HtmlHelper RequiresThemedJsFolder(this HtmlHelper html, IMasterModel model)
 {
     return(html.RequiresJsFolder(PathHelper.GetThemePath(model) + "Assets/js"));
 }
예제 #3
0
 public static HtmlHelper RequiresThemedJs(this HtmlHelper html, IMasterModel model, string filePath)
 {
     return(html.RequiresJs(PathHelper.GetThemePath(model) + "Assets/js" + filePath.EnsureStartsWith('/')));
 }
예제 #4
0
 /// <summary>
 /// Returns the url of a themed asset
 /// </summary>
 /// <param name="url"></param>
 /// <param name="model"></param>
 /// <param name="relativeAssetPath"></param>
 /// <returns></returns>
 public static string ThemedAsset(this UrlHelper url, IMasterModel model, string relativeAssetPath)
 {
     return(VirtualPathUtility.ToAbsolute(PathHelper.GetThemePath(model)).EnsureEndsWith('/') + "assets/" + relativeAssetPath);
 }