Fixing script dependencies when file don't exist

In this case scripts would be rendered using the standard Script shape
and would be rendered in another step, breaking dependency order.

Work Item: 19255

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2012-12-06 15:53:29 -08:00
parent fee0d0469c
commit e3fa12bcc7

View File

@ -342,8 +342,9 @@ namespace Orchard.Core.Shapes {
}
[Shape]
public void Script(TextWriter Output, ResourceDefinition Resource, string Url, string Condition, Dictionary<string, string> TagAttributes) {
ResourceManager.WriteResource(Output, Resource, Url, Condition, TagAttributes);
public void Script(HtmlHelper Html, TextWriter Output, ResourceDefinition Resource, string Url, string Condition, Dictionary<string, string> TagAttributes) {
// do not write to Output directly as Styles are rendered in Zones
ResourceManager.WriteResource(Html.ViewContext.Writer, Resource, Url, Condition, TagAttributes);
}
[Shape]