Fixing fixed stuff

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2011-03-25 17:29:58 -07:00
parent d6d5b76ca2
commit b9b4a1bbe0
2 changed files with 14 additions and 22 deletions
@@ -115,8 +115,8 @@
shapeTracingContainer.resizable({ shapeTracingContainer.resizable({
handles: { n: '#shape-tracing-resize-handle' }, handles: { n: '#shape-tracing-resize-handle' },
grid: 20, // mitigates the number of calls to syncResize(), and aligns to the line height grid: 20, // mitigates the number of calls to syncResize(), and aligns to the line height
resize: disableShapeTracing, resize: shapeTracingEnabled = false,
stop: enableShapeTracing stop: shapeTracingEnabled = true
}); });
var shapeNodes = {}; // represents the main index of shape nodes, indexed by id var shapeNodes = {}; // represents the main index of shape nodes, indexed by id
@@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections; using System.Collections;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Xml.Linq; using System.Xml.Linq;
@@ -113,42 +114,33 @@ namespace Orchard.DesignerTools.Services {
} }
_node.Add(_node = new XElement("ul")); _node.Add(_node = new XElement("ul"));
foreach (var member in members.OrderBy(m => m.Name)) { foreach (var member in members) {
if (o is ContentItem && member.Name == "ContentManager") { if (o is ContentItem && member.Name == "ContentManager") {
// ignore Content Manager explicitly // ignore Content Manager explicitly
continue; continue;
} }
try {
DumpMember(o, member);
}
catch {
// ignore members which can't be rendered
}
// process ContentItem.Parts specifically // process ContentItem.Parts specifically
if (o is ContentItem && member.Name == "Parts") { if (o is ContentItem && member.Name == "Parts") {
foreach (var part in ((ContentItem)o).Parts) { foreach (var part in ((ContentItem)o).Parts) {
try { // Debug.WriteLine(_node.GetHashCode() + " " + o.GetHashCode() + " Parts: " + part.PartDefinition.Name);
Dump(part, part.PartDefinition.Name); Dump(part, part.PartDefinition.Name);
}
catch{
// ignore dump issues
}
} }
} }
// process ContentPart.Fields specifically // process ContentPart.Fields specifically
if (o is ContentPart && member.Name == "Fields") { if (o is ContentPart && member.Name == "Fields") {
foreach (var field in ((ContentPart)o).Fields) { foreach (var field in ((ContentPart)o).Fields) {
try { Dump(field, field.Name);
Dump(field, field.Name);
}
catch {
// ignore dump issues
}
} }
} }
try {
DumpMember(o, member);
}
catch {
// ignore members which can't be rendered
}
} }
_node = _node.Parent; _node = _node.Parent;