Fixing Model navigation in shape tracing

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-04-06 16:14:13 -07:00
parent 81b28e9d26
commit 39a463ea22
5 changed files with 85 additions and 125 deletions

View File

@@ -20,10 +20,6 @@
<script type="text/javascript">
shapeTracingMetadataHost[@Model.ShapeId] = {};
@foreach (var pair in Model.LocalReferences) {
<text>shapeTracingMetadataHost.references[@pair.Key] = { @(new MvcHtmlString(pair.Value)) };</text>
}
shapeTracingMetadataHost[@Model.ShapeId].shape = {
type: '@Model.ShapeType',
template: '@Model.Template',
@@ -50,7 +46,7 @@ shapeTracingMetadataHost[@Model.ShapeId].shape = {
],
html: '@RemoveEmptyLines(RemoveBeacons(Display(Model.ChildContent).ToString())).Replace(Environment.NewLine, "\\n")',
templateContent: '@(String.IsNullOrWhiteSpace((string)Model.TemplateContent) ? @T("Content not available as coming from source code.") : @Model.TemplateContent.Replace(Environment.NewLine, "\\n"))',
model: shapeTracingMetadataHost.references[@Model.Reference]
model: { @(new MvcHtmlString((string)@Model.Dump)) }
};
@if(!String.IsNullOrEmpty((string)Model.PlacementSource) && !TempData.ContainsKey((string)Model.PlacementSource)) {

View File

@@ -40,7 +40,6 @@
Wrappers: Model.Metadata.Wrappers,
ChildContent: Model.Metadata.ChildContent,
ShapeId: Model.ShapeId,
Reference: Model.Reference,
LocalReferences: Model.LocalReferences
Dump: Model.Dump
));
}