| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- @{
- Layout = "~/Views/Shared/_FunctionLayout.cshtml";
- }
- @model IEnumerable<GreenTree.Nachtragsmanagement.Web.Models.Misc.HelpPageDataModel>
- <script src='@Url.Content("~/Scripts/jquery.mCustomScrollbar.concat.min.js")'></script>
- <script>
- var deleteId;
- var saveOperation;
- $(document).ready(function () {
- setTimeout(function () {
- setHelpContentHeight();
- @if (ViewData["InitialEditHelpPage"] != null)
- {
- ViewContext.Writer.Write("editHelpPage(" + (int)ViewData["InitialEditHelpPage"] + ");");
- }
- }, 500);
- });
- $(window).resize(function () {
- setHelpContentHeight();
- });
- function setHelpContentHeight() {
- var height = $(window).height();
- $("#helpPageNavigation").height(height - 60);
- $("#helpPageContent").height(height - 32);
- if (typeof devHelpPageHtmlContentEditor !== 'undefined') {
- devHelpPageHtmlContentEditor.SetHeight(height);
- }
- }
- function viewHelpPage(id) {
- if (!id) return;
- $.ajax({
- url: '@Url.Action("ViewHelpPage", "Misc")',
- data: { Id: id },
- success: function (response) {
- $("#helpPageContent").html(response);
- },
- error: function () {
- alert("error occured");
- }
- });
- }
- function editHelpPage(id) {
- if (!id) return;
- $.ajax({
- url: '@Url.Action("EditHelpPage", "Misc")',
- data: { Id: id },
- success: function (response) {
- setTimeout(function () {
- $("#helpPageContent").html(response);
- devHelpPageHtmlContentEditor.SetHeight($("#helpPageContent").height() - 1);
- }, 200);
- },
- error: function () {
- alert("error occured");
- }
- });
- }
- function saveDataCallback() {
- devPopupControlEditHelpPage.Hide();
- }
- function confirmDelete(id) {
- if (!id) return;
- deleteId = id;
- $.ajax({
- type: "GET",
- url: '@Url.Action("GetHelpPage", "Misc")',
- data: { Id: id },
- success: function (response) {
- if (response == "notFound") return;
- var helpPage = JSON.parse(response);
- var popupControl = MVCxClientPopupControl.Cast(devPopupControlDeleteHelpPage);
- popupControl.SetHeaderText(popupControl.GetHeaderText().replace("{helpPage}", helpPage.Title));
- $(".dialogText").text($(".dialogText").text().replace("{helpPage}", helpPage.Title));
- popupControl.Show();
- }
- });
- }
- function deleteHelpPage() {
- $.ajax({
- type: "POST",
- url: '@Url.Action("DeleteHelpPage", "Misc")',
- data: { Id: deleteId },
- success: function (response) {
- var popupControl = MVCxClientPopupControl.Cast(devPopupControlDeleteHelpPage);
- popupControl.Hide();
- setTimeout(function () {
- window.location = window.location;
- }, 200);
- },
- error: function () {
- alert("error occured");
- }
- });
- }
- </script>
- <link rel="stylesheet" type="text/css" href='@Url.Content("~/Content/jquery.mCustomScrollbar.min.css")' />
- <style>
- .helpTable {
- width: 100%;
- }
- .helpTable > tbody > tr > td {
- vertical-align: top;
- }
- .helpTable > tbody > tr > td:first-of-type {
- padding-right: 12px;
- }
- .helpTable > tbody > tr > td:last-of-type {
- padding-left: 12px;
- }
- .helpPageMenu {
- width: auto;
- margin: 0 8px 6px 0;
- padding-bottom: 6px;
- border-bottom: 1px dashed #009688;
- overflow: auto;
- }
- #helpPageNavigation {
- border-right: 1px solid #009688;
- }
- #helpPageContent {
- color: black;
- overflow: auto !important;
- }
- </style>
- <table class="helpTable">
- <tr>
- <td style="width: 20%; min-width: 313px">
- <div class="helpPageMenu">
- @Html.DevExpress().Button(b =>
- {
- b.Name = "devButtonNewHelpPage";
- b.Text = "Neu";
- b.UseSubmitBehavior = false;
- //b.RenderMode = ButtonRenderMode.Link;
- b.ClientSideEvents.Click = "function (s, e) { editHelpPage(-1); }";
- }).GetHtml()
- </div>
- <div id="helpPageNavigation" class="mCustomScrollbar" data-mcs-theme="minimal-dark" style="width: 100%">
- @Html.Partial("~/Views/Misc/_HelpPageTreePartial.cshtml", Model)
- </div>
- </td>
- <td style="width: 80%">
- <div id="helpPageContent" style="width: 100%">
- </div>
- </td>
- </tr>
- </table>
- @Html.Partial("~/Views/Shared/_PopupDialogYesNo.cshtml", new GreenTree.Nachtragsmanagement.Web.Models.Global.YesNoDialogModel
- {
- PopupName = "devPopupControlDeleteHelpPage",
- Content = "<div class='dialogText' style='padding: 12px'>Sind Sie sicher, dass Sie die Hilfe-Seite \"{helpPage}\" löschen möchten?</div>",
- HeaderText = "\"{helpPage}\" löschen",
- YesFunction = "function (s, e) { deleteHelpPage(); }"
- })
|