public Render ( |
||
writer | ||
Résultat | void |
protected virtual void AppendControlPanel(TextWriter writer, IEngine engine, ContentItem item) { writer.Write("<script>n2 = window.n2 || {};"); writer.Write("n2.settings = "); var settings = engine.Resolve <InterfaceBuilder>().GetControlPanelDefinition(engine.RequestContext.HttpContext, item); settings.ToJson(writer); writer.Write(";</script>"); var resources = new ResourcesExtensions.ResourcesHelper() { StateCollection = StateCollection, Writer = writer }; resources = resources.Constants(); if (IncludeJQuery) { resources = resources.JQuery(); } if (IncludePartScripts) { resources = resources.JavaScript("{ManagementUrl}/App/Preview/PreviewBoostrapper.js"); } if (IncludePartStyles) { resources = resources.IconsCss().StyleSheet("{ManagementUrl}/App/Preview/Preview.css"); } resources.Render(writer); }
protected virtual void AppendControlPanel(TextWriter writer, IEngine engine, ContentItem item) { writer.Write("<script>n2 = window.n2 || {};"); writer.Write("n2.settings = "); var settings = engine.Resolve<InterfaceBuilder>().GetControlPanelDefinition(engine.RequestContext.HttpContext, item); settings.ToJson(writer); writer.Write(";</script>"); var resources = new ResourcesExtensions.ResourcesHelper() { StateCollection = StateCollection, Writer = writer }; resources = resources.Constants(); if (IncludeJQuery) resources = resources.JQuery(); if (IncludePartScripts) resources = resources.JavaScript("{ManagementUrl}/App/Preview/PreviewBoostrapper.js"); if (IncludePartStyles) resources = resources.IconsCss().StyleSheet("{ManagementUrl}/App/Preview/Preview.css"); resources.Render(writer); }