|
|
@@ -16,12 +16,13 @@
|
|
|
}
|
|
|
|
|
|
function saveHelpPage() {
|
|
|
+ devLoadingPanelSave.Show();
|
|
|
var form = $("#helpPageEditForm");
|
|
|
var selectedNode = devHelpPageSelectionTree.GetSelectedNode();
|
|
|
$("#Content").val(devHelpPageHtmlContentEditor.GetHtml());
|
|
|
- $("#ParentId").val(selectedNode == null
|
|
|
- ? null
|
|
|
- : selectedNode.name);
|
|
|
+ if (selectedNode != null) {
|
|
|
+ $("#ParentId").val(selectedNode.name);
|
|
|
+ }
|
|
|
$(form).submit(function (e) {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
@@ -29,7 +30,6 @@
|
|
|
data: form.serialize(),
|
|
|
success: function (response) {
|
|
|
setTimeout(function () {
|
|
|
- $(".helpPageEditFormEditContainer").remove();
|
|
|
if (response.startsWith("success")) {
|
|
|
if (saveOperation == "save") {
|
|
|
devPopupControlEditHelpPage.Hide();
|
|
|
@@ -38,8 +38,12 @@
|
|
|
window.location = '@Url.Action("ViewHelpPages", "Misc")' + '?id=' + id;
|
|
|
}
|
|
|
} else {
|
|
|
- $("body").append(response);
|
|
|
+ $("#helpPageContent").html(response);
|
|
|
+ setTimeout(function () {
|
|
|
+ devPopupControlEditHelpPage.Show();
|
|
|
+ }, 100);
|
|
|
}
|
|
|
+ devLoadingPanelSave.Hide();
|
|
|
}, 200);
|
|
|
}
|
|
|
});
|
|
|
@@ -54,7 +58,18 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
- @Html.Partial("~/Views/Misc/_HelpPageHtmlEditPartial.cshtml", Model)
|
|
|
+ @Html.DevExpress().LoadingPanel(t =>
|
|
|
+ {
|
|
|
+ t.Name = "devLoadingPanelSave";
|
|
|
+ t.Text = "Wird gespeichert ...";
|
|
|
+ t.Styles.LoadingDiv.Opacity = 0;
|
|
|
+ t.Modal = true;
|
|
|
+ }).GetHtml()
|
|
|
+
|
|
|
+ @using (Html.BeginForm())
|
|
|
+ {
|
|
|
+ @Html.Partial("~/Views/Misc/_HelpPageHtmlEditPartial.cshtml", Model)
|
|
|
+ }
|
|
|
|
|
|
@using (Html.BeginForm("EditHelpPage", "Misc", FormMethod.Post, new { id = "helpPageEditForm" }))
|
|
|
{
|
|
|
@@ -71,10 +86,11 @@
|
|
|
s.HeaderText = "\"" + Model.Title + "\" bearbeiten";
|
|
|
|
|
|
s.Modal = true;
|
|
|
- s.Width = new Unit(250, UnitType.Pixel);
|
|
|
+ s.Width = new Unit(350, UnitType.Pixel);
|
|
|
s.CloseAction = CloseAction.CloseButton;
|
|
|
s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
|
|
|
- s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
|
|
|
+ s.PopupVerticalAlign = PopupVerticalAlign.TopSides;
|
|
|
+ s.PopupVerticalOffset = 80;
|
|
|
s.AllowDragging = false;
|
|
|
s.AllowResize = false;
|
|
|
s.ShowFooter = false;
|
|
|
@@ -92,16 +108,21 @@
|
|
|
t.Width = new Unit(100, UnitType.Percentage);
|
|
|
}).Render();
|
|
|
|
|
|
- ViewContext.Writer.Write(Html.CustomLabelFor(m => m.ParentId, "Hilfe-Seiten:"));
|
|
|
+ ViewContext.Writer.Write(Html.CustomLabelFor(m => m.ParentId, "Übergeordnete Seite:"));
|
|
|
ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.ParentId).ToHtmlString());
|
|
|
Html.DevExpress().DropDownEdit(t =>
|
|
|
{
|
|
|
t.Name = "ParentText";
|
|
|
t.Width = new Unit(100, UnitType.Percentage);
|
|
|
+ t.Text = Model.ParentText;
|
|
|
|
|
|
t.SetDropDownWindowTemplateContent(l =>
|
|
|
{
|
|
|
- Html.RenderPartial("~/Views/Misc/_HelpPageTreePartial.cshtml", ViewData["AllHelpPages"]);
|
|
|
+ ViewContext.Writer.Write("<div style=\"width: 100%; height: 230px; overflow: auto\">");
|
|
|
+ {
|
|
|
+ Html.RenderPartial("~/Views/Misc/_HelpPageTreePartial.cshtml", ViewData["AllHelpPages"]);
|
|
|
+ }
|
|
|
+ ViewContext.Writer.Write("</div>");
|
|
|
});
|
|
|
}).Render();
|
|
|
|