mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 01:57:55 +08:00
Changed to manual bootstrapping of LayoutEditor Angular app. Fixes #5722.
This commit is contained in:
@@ -26,11 +26,12 @@
|
||||
Style.Include("LayoutEditor.css", "LayoutEditor.min.css");
|
||||
Script.Include("LayoutDesignerHost.js");
|
||||
|
||||
// The grid system
|
||||
// The grid system.
|
||||
Style.Include("default-grid.css");
|
||||
|
||||
using (Script.Foot()) {
|
||||
<script>
|
||||
|
||||
angular
|
||||
.module("LayoutEditor")
|
||||
.constant("environment", {
|
||||
@@ -38,7 +39,10 @@
|
||||
return "@Url.Action("Get", "Template", new { area = "Orchard.Layouts" })" + "/" + templateName;
|
||||
}
|
||||
});
|
||||
jQuery(function () {
|
||||
|
||||
angular.bootstrap($(".layout-editor-holder")[0], ["LayoutEditor"]);
|
||||
|
||||
$(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))"));
|
||||
var layoutEditor = window.layoutEditor = new LayoutEditor.Editor(editorConfig, editorCanvasData);
|
||||
@@ -56,6 +60,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -102,7 +107,7 @@
|
||||
</ol>
|
||||
</div>
|
||||
<div class="layout-editor-holder">
|
||||
<orc-layout-editor model="window.layoutEditor" ng-app="LayoutEditor" />
|
||||
<orc-layout-editor model="window.layoutEditor" />
|
||||
</div>
|
||||
@Display.DialogTemplate(Name: "Layout")
|
||||
<div class="layout-editor-help-dialog" title="@T("Layout editor help")">
|
||||
|
Reference in New Issue
Block a user