From 43d8b1a8036be6a9c115711a74eac7946d9150fb Mon Sep 17 00:00:00 2001 From: Connor Smallman Date: Mon, 7 Dec 2015 15:16:20 +0000 Subject: [PATCH] Wait for document ready before calling LayoutEditor constructor --- .../Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml b/src/Orchard.Web/Modules/Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml index 816ebed41..ce5470d25 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Views/EditorTemplates/LayoutEditor.cshtml @@ -39,12 +39,12 @@ return "@Url.Action("Get", "Template", new { area = "Orchard.Layouts" })" + "/" + templateName; } }); - (function () { + jQuery(function () { var editorConfig = JSON.parse(LayoutEditor.decode("@Html.Raw(Url.Encode(Model.ConfigurationData))")); var editorCanvasData = JSON.parse(LayoutEditor.decode("@Html.Raw(Url.Encode(Model.Data))")); window.layoutEditor = new LayoutEditor.Editor(editorConfig, editorCanvasData); - })(jQuery); + }); }