Completes: U4-3712 Allow c# property editors to have custom js injected into the js initialization block so they can load in angular controllers

This commit is contained in:
Shannon
2013-11-28 14:27:58 +11:00
parent 478b7cde42
commit 50e10155e7
10 changed files with 162 additions and 70 deletions

View File

@@ -1,4 +1,5 @@
using ClientDependency.Core;
using System.Web;
using ClientDependency.Core;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -22,7 +23,7 @@ namespace Umbraco.Web.UI.JavaScript
/// <summary>
/// Processes all found manifest files and outputs yepnope.injectcss calls for all css files found in all manifests
/// </summary>
public string GetStylesheetInitialization()
public string GetStylesheetInitialization(HttpContextBase httpContext)
{
var merged = new JArray();
foreach (var m in _parser.GetManifests())
@@ -31,7 +32,10 @@ namespace Umbraco.Web.UI.JavaScript
}
//now we can optimize if in release mode
merged = CheckIfReleaseAndOptimized(merged, ClientDependencyType.Css);
merged = CheckIfReleaseAndOptimized(merged, ClientDependencyType.Css, httpContext);
//now we need to merge in any found cdf declarations on property editors
ManifestParser.MergeJArrays(merged, ScanPropertyEditors(ClientDependencyType.Css, httpContext));
return ParseMain(merged);
}