diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj b/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj
index 719e42e3c..5b620a02c 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Orchard.DesignerTools.csproj
@@ -68,7 +68,6 @@
-
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
deleted file mode 100644
index f84e3211e..000000000
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Scripts/_orchard-designertools-shapetracing.js
+++ /dev/null
@@ -1,111 +0,0 @@
-(function ($) {
- $(function () {
- $("
")
- .appendTo("body");
- $("#debug-shapes").click(function () {
- var _this = $(this);
- $("html").toggleClass(_this.attr("id"));
- $(this).toggleClass("debug-active");
- });
- $("#debug-zones").click(function () {
- var _this = $(this);
- $("html").toggleClass(_this.attr("id"));
- $(this).toggleClass("debug-active");
-
- if ($(this).hasClass("debug-active")) {
-
- // renders the zone name in each zone
- $(".zone").each(function () {
- var classes = $(this).attr("class").split(' ');
-
- for (i = 0; i < classes.length; i++) {
- if (classes[i].indexOf("zone-") === 0) {
- $(this).append('' + classes[i].substr(classes[i].indexOf("-") + 1) + '
');
- }
- }
-
- });
- }
- else {
- $(".zone-name").remove();
- }
-
- });
- $("#debug-control-toggle").click(function () {
- var _this = $(this), open = "debug-open";
- if (_this.is("." + open)) {
- _this.prev().hide("fast", function () { _this.removeClass(open).html("»"); });
- } else {
- _this.prev().show("fast", function () { _this.addClass(open).html("«"); });
- }
- });
-
- $("div.shape-tracing.wrapper").click(function (e) {
- var _this = $(this);
- var classes = $(this).attr("class").split(' ');
- e.stopPropagation();
- for (i = 0; i < classes.length; i++) {
- if (classes[i].indexOf("shapeId-") === 0) {
- var shapeId = classes[i].substr(classes[i].indexOf("-") + 1);
- $("div.shape-tracing.wrapper").toggleClass('selected', false);
- _this.toggleClass('selected', true);
- $("div.shape-tracing.meta").toggle(false);
- $("div.shape-tracing.meta.shapeId-" + shapeId).toggle(true);
- }
- }
- });
-
- /* tabs */
- function bindTab(selector) {
- $('li' + selector).click(function () {
- var _this = $(this);
-
- // toggle the selected class on the tab li
- _this.parent().children('li').toggleClass('selected', false);
- _this.toggleClass('selected', true);
-
- // hide all tabs and display the selected one
- var wrapper = _this.parent().parent().first();
- wrapper.children('.content').children().toggle(false);
- wrapper.children('.content').children('div' + selector).toggle(true);
-
- if (wrapper.children('.content').children('div' + selector).children('.CodeMirror').length == 0) {
- var textArea = wrapper.children('.content').children('div' + selector).children('textarea').get(0);
- if (textArea) {
- CodeMirror.fromTextArea(textArea, { mode: "razor", tabMode: "indent", height: "100%", readOnly : true });
- }
- }
-
- });
- }
-
- var glyph = $("");
- $('div.model div.type').prev().prepend(glyph);
-
- $('div.model ul ul').toggle(false);
-
- $('span.expando-glyph-container').click(function () {
- var __this = $(this);
-
- if (__this.hasClass("closed") || __this.hasClass("closing")) {
- __this.parent().parent().parent().children('ul').slideDown(300, function () { __this.removeClass("opening").removeClass("closed").addClass("open"); });
- __this.addClass("opening");
- }
- else {
- __this.parent().parent().parent().children('ul').slideUp(300, function () { __this.removeClass("closing").removeClass("open").addClass("closed"); });
- __this.addClass("closing");
- }
-
- return false;
- });
-
- bindTab('.shape');
- bindTab('.model');
- bindTab('.placement');
- bindTab('.templates');
- bindTab('.source');
- bindTab('.html');
-
-
- });
-})(jQuery);
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 3f0fd3b78..ef55c8f0e 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,5 +1,8 @@
jQuery(document).ready(function ($) {
$(function () {
+ // default shape window height when first opened
+ var defaultHeight = 200;
+
// append the shape tracing window container at the end of the document
$(' ' +
'
' +
@@ -67,7 +70,7 @@
var _this = $(this);
_this.toggleClass('expanded');
if (_this.hasClass('expanded')) {
- shapeTracingContainer.height(Math.max(previousSize, 100, shapeTracingContainer.height()));
+ shapeTracingContainer.height(Math.max(previousSize, defaultHeight, shapeTracingContainer.height()));
enableShapeTracing();
}
else {