Removes remaining yepnop dependencies

This commit is contained in:
per ploug
2014-05-05 12:59:34 +02:00
parent 27e6b8c80c
commit dbbe3fe5fb
19 changed files with 51 additions and 140 deletions

View File

@@ -45,24 +45,13 @@ namespace Umbraco.Web.UI.JavaScript
public string GetJavascriptInitialization(HttpContextBase httpContext, JArray umbracoInit, JArray additionalJsFiles = null)
{
var result = GetJavascriptInitializationArray(httpContext, umbracoInit, additionalJsFiles);
var noCache = Resources.JsNoCache;
//if debugging, add timestamp, if in production we tell yepNope to append umb+cdf version
//this is needed even tho cdf does this on its serverside merged js
//as assetsService.load() also need to append these versions to ensure cache bursting on updates + pack installs
if (httpContext.IsDebuggingEnabled)
noCache = noCache.Replace("##rnd##", "(new Date).getTime()");
else
{
//create a unique hash code of the current umb version and the current cdf version
var versionHash = UrlHelperExtensions.GetCacheBustHash();
var version = "'" + versionHash + "'";
noCache = noCache.Replace("##rnd##", version);
}
//create a unique hash code of the current umb version and the current cdf version
var versionHash = UrlHelperExtensions.GetCacheBustHash();
var version = "'" + versionHash + "'";
return ParseMain(
result.ToString(),
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
return ParseMain(
result.ToString(),
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
}
public JArray GetJavascriptInitializationArray(HttpContextBase httpContext, JArray umbracoInit, JArray additionalJsFiles = null)