/// <exclude /> public ScriptLoader(string type, string directive = null, bool updateManagerDisabled = false) { _ctx = HttpContext.Current; _type = type; _updateManagerDisabled = updateManagerDisabled; if (directive == "compile") { _mode = CompositeScriptMode.COMPILE; } else if (CookieHandler.Get("mode") == "develop") { _mode = CompositeScriptMode.DEVELOP; } else { _mode = CompositeScriptMode.OPERATE; } string folderPath = Path.Combine(_ctx.Request.PhysicalApplicationPath, "Composite"); switch (type) { case "top": _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath); break; case "sub": _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath); break; } }
/// <exclude /> public static string Render(string directive = null) { string root = UrlUtils.AdminRootPath; bool isInDevelopMode = CookieHandler.Get("mode") == "develop"; string styleFile = isInDevelopMode ? "/styles/styles.css" : "/styles/styles.min.css"; string cssLink = root + styleFile; string filePath = PathUtil.Resolve("~/Composite" + styleFile); if (C1File.Exists(filePath)) { cssLink += "?timestamp=" + C1File.GetLastWriteTimeUtc(filePath).GetHashCode(); } return(stylesheet(cssLink)); }