|
|
@@ -5,6 +5,13 @@
|
|
|
<div class="helpPageEditContainer">
|
|
|
|
|
|
<script>
|
|
|
+ function onHtmlToolbarCustomCommand(e) {
|
|
|
+ if (!e) return;
|
|
|
+ if (e.commandName == "save") {
|
|
|
+ devPopupControlEditHelpPage.Show();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
function saveHelpPage() {
|
|
|
var form = $("#helpPageEditForm");
|
|
|
$(form).submit(function (e) {
|
|
|
@@ -29,29 +36,29 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
- @Html.DevExpress().HtmlEditorFor(m => m.Content).GetHtml()
|
|
|
-
|
|
|
- @Html.DevExpress().PopupControl(s =>
|
|
|
+ @using (Html.BeginForm("EditHelpPage", "Misc", FormMethod.Post, new { id = "helpPageEditForm" }))
|
|
|
{
|
|
|
- s.Name = "devPopupControlEditHelpPage";
|
|
|
-
|
|
|
- if (Model.Id == -1)
|
|
|
- s.HeaderText = "Neue Hilfe-Seite erstellen";
|
|
|
- else
|
|
|
- s.HeaderText = "\"" + Model.Title + "\" bearbeiten";
|
|
|
-
|
|
|
- s.Modal = true;
|
|
|
- s.Width = new Unit(250, UnitType.Pixel);
|
|
|
- s.CloseAction = CloseAction.CloseButton;
|
|
|
- s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
|
|
|
- s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
|
|
|
- s.AllowDragging = false;
|
|
|
- s.AllowResize = false;
|
|
|
- s.ShowFooter = false;
|
|
|
- s.ShowOnPageLoad = false;
|
|
|
- s.SetContent(() =>
|
|
|
+ @Html.Partial("~/Views/Misc/_HelpPageHtmlEditPartial.cshtml", Model)
|
|
|
+
|
|
|
+ @Html.DevExpress().PopupControl(s =>
|
|
|
{
|
|
|
- using (Html.BeginForm("EditHelpPage", "Misc", FormMethod.Post, new { id = "helpPageEditForm" }))
|
|
|
+ s.Name = "devPopupControlEditHelpPage";
|
|
|
+
|
|
|
+ if (Model.Id == -1)
|
|
|
+ s.HeaderText = "Neue Hilfe-Seite erstellen";
|
|
|
+ else
|
|
|
+ s.HeaderText = "\"" + Model.Title + "\" bearbeiten";
|
|
|
+
|
|
|
+ s.Modal = true;
|
|
|
+ s.Width = new Unit(250, UnitType.Pixel);
|
|
|
+ s.CloseAction = CloseAction.CloseButton;
|
|
|
+ s.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
|
|
|
+ s.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
|
|
|
+ s.AllowDragging = false;
|
|
|
+ s.AllowResize = false;
|
|
|
+ s.ShowFooter = false;
|
|
|
+ s.ShowOnPageLoad = false;
|
|
|
+ s.SetContent(() =>
|
|
|
{
|
|
|
ViewContext.Writer.Write("<div class='editFormWrapper'>");
|
|
|
|
|
|
@@ -73,7 +80,7 @@
|
|
|
|
|
|
ViewContext.Writer.Write(Html.CustomLabelFor(m => m.Subcategory, "Unterkategorie:"));
|
|
|
ViewContext.Writer.Write(Html.ValidationMessageFor(m => m.Subcategory).ToHtmlString());
|
|
|
- Html.DevExpress().TextBoxFor(m => m.Title, t =>
|
|
|
+ Html.DevExpress().TextBoxFor(m => m.Subcategory, t =>
|
|
|
{
|
|
|
t.Width = new Unit(100, UnitType.Percentage);
|
|
|
}).Render();
|
|
|
@@ -97,10 +104,10 @@
|
|
|
AcceptFunction = "function (s, e) { saveHelpPage(); }"
|
|
|
}
|
|
|
);
|
|
|
- }
|
|
|
- });
|
|
|
- s.Styles.Content.Paddings.Padding = new Unit(0);
|
|
|
- s.Styles.ModalBackground.Opacity = 0;
|
|
|
- }).GetHtml()
|
|
|
+ });
|
|
|
+ s.Styles.Content.Paddings.Padding = new Unit(0);
|
|
|
+ s.Styles.ModalBackground.Opacity = 0;
|
|
|
+ }).GetHtml()
|
|
|
+ }
|
|
|
|
|
|
</div>
|