working on U4-4011 Package installation will require either a full app refresh or we will need to re-lazy load in all of the assets but unfortunately we cannot lazy load in things like directives as angular doesn't like that, we have to re-load the browser.

This commit is contained in:
Shannon
2014-01-15 17:18:23 +11:00
parent 0bc39afdab
commit 0e6c199a7e
14 changed files with 632 additions and 768 deletions

View File

@@ -24,6 +24,13 @@ namespace Umbraco.Web.UI.JavaScript
/// Processes all found manifest files and outputs yepnope.injectcss calls for all css files found in all manifests
/// </summary>
public string GetStylesheetInitialization(HttpContextBase httpContext)
{
var result = GetStylesheetInitializationArray(httpContext);
return ParseMain(result);
}
public JArray GetStylesheetInitializationArray(HttpContextBase httpContext)
{
var merged = new JArray();
foreach (var m in _parser.GetManifests())
@@ -37,7 +44,7 @@ namespace Umbraco.Web.UI.JavaScript
//now we need to merge in any found cdf declarations on property editors
ManifestParser.MergeJArrays(merged, ScanPropertyEditors(ClientDependencyType.Css, httpContext));
return ParseMain(merged);
return merged;
}

View File

@@ -39,6 +39,15 @@ namespace Umbraco.Web.UI.JavaScript
/// Processes all found manifest files and outputs the main.js file containing all plugin manifests
/// </summary>
public string GetJavascriptInitialization(HttpContextBase httpContext, JArray umbracoInit, JArray additionalJsFiles = null)
{
var result = GetJavascriptInitializationArray(httpContext, umbracoInit, additionalJsFiles);
return ParseMain(
result.ToString(),
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
}
public JArray GetJavascriptInitializationArray(HttpContextBase httpContext, JArray umbracoInit, JArray additionalJsFiles = null)
{
foreach (var m in _parser.GetManifests())
{
@@ -57,9 +66,7 @@ namespace Umbraco.Web.UI.JavaScript
//now we need to merge in any found cdf declarations on property editors
ManifestParser.MergeJArrays(umbracoInit, ScanPropertyEditors(ClientDependencyType.Javascript, httpContext));
return ParseMain(
umbracoInit.ToString(),
IOHelper.ResolveUrl(SystemDirectories.Umbraco));
return umbracoInit;
}
/// <summary>