diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Scripts/orchard-designertools-shapetracing.js b/src/Orchard.Web/Modules/Orchard.DesignerTools/Scripts/orchard-designertools-shapetracing.js
index 33f7ac31d..cf5cf32c8 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Scripts/orchard-designertools-shapetracing.js
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Scripts/orchard-designertools-shapetracing.js
@@ -1,14 +1,14 @@
(function ($) {
$(function () {
// append the shape tracing window container at the end of the document
- $( '
' +
- '
' +
+ $('
' +
+ '
' +
'
' +
'
window
' +
'
' +
- '
'
+ '
'
).appendTo('body');
// preload main objects
@@ -56,6 +56,7 @@
previousSize = shapeTracingContainer.height();
shapeTracingContainer.height(initialContainerSize);
}
+
syncResize();
});
@@ -63,5 +64,30 @@
$('#shape-tracing-resize-handle').addClass('ui-resizable-handle ui-resizable-n');
shapeTracingContainer.resizable({ handles: { n: '#shape-tracing-resize-handle'} });
+ // projects the shape ids to each DOM element
+ var shapeTracingWrappers = $('.shape-tracing-wrapper');
+ shapeTracingWrappers.each(function () {
+ var _this = $(this);
+ var shapeId = _this.attr('shape-id');
+ // assign the shape-id attribute to all children, except wrappers (it would erase their own shape-id)
+ _this.find(':not(div.shape-tracing-wrapper)').attr('shape-id', shapeId);
+ });
+
+ // removes all wrappers, by unwrapping the first element of each of them
+ shapeTracingWrappers.each(function () {
+ $(this).contents().first().unwrap();
+ });
+
+ // create an overlay on shapes' descendants
+ $('[shape-id]').hover(
+ function () {
+ $('*').removeClass('shape-tracing-overlay');
+ $(this).addClass('shape-tracing-overlay');
+ },
+ function () {
+ $(this).removeClass('shape-tracing-overlay');
+ }
+ );
+
});
})(jQuery);
diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Services/ShapeTracingFactory.cs b/src/Orchard.Web/Modules/Orchard.DesignerTools/Services/ShapeTracingFactory.cs
index 28074bc10..92bcb9fe1 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Services/ShapeTracingFactory.cs
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Services/ShapeTracingFactory.cs
@@ -29,7 +29,16 @@ namespace Orchard.DesignerTools.Services {
if (context.ShapeType != "Layout"
&& context.ShapeType != "DocumentZone"
&& context.ShapeType != "PlaceChildContent"
- && context.ShapeType != "ContentZone"
+ && context.ShapeType != "HeadScripts"
+ && context.ShapeType != "FootScripts"
+ && context.ShapeType != "HeadLinks"
+ && context.ShapeType != "FootLinks"
+ && context.ShapeType != "StylesheeLinks"
+ && context.ShapeType != "Style"
+ && context.ShapeType != "Feed"
+ && context.ShapeType != "Resource"
+ && context.ShapeType != "Meta"
+ // && context.ShapeType != "ContentZone"
&& context.ShapeType != "ShapeTracingMeta") {
var shapeMetadata = (ShapeMetadata)context.Shape.Metadata;
diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css b/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css
index efe1446df..122c74326 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Styles/orchard-designertools-shapetracing.css
@@ -59,4 +59,8 @@
height:5px;
background-color:transparent;
cursor:n-resize;
-}
\ No newline at end of file
+}
+
+.shape-tracing-overlay {
+ background-color:#eee;
+}
diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingWrapper.cshtml b/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingWrapper.cshtml
index 521c57166..4225b1a9a 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingWrapper.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingWrapper.cshtml
@@ -21,7 +21,7 @@
Script.Include("CodeMirror/htmlmixed.js");
}
-