HelpPages.cshtml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. @{
  2. Layout = "~/Views/Shared/_FunctionLayout.cshtml";
  3. }
  4. @model IEnumerable<GreenTree.Nachtragsmanagement.Web.Models.Misc.HelpPageTreeModel>
  5. <script src='@Url.Content("~/Scripts/jquery.mCustomScrollbar.concat.min.js")'></script>
  6. <script>
  7. $(document).ready(function () {
  8. setTimeout(function () {
  9. setHelpContentHeight();
  10. }, 500);
  11. });
  12. $(window).resize(function () {
  13. setHelpContentHeight();
  14. });
  15. function setHelpContentHeight() {
  16. var height = $(window).height() - 50;
  17. $("#helpPageNavigation").height(height);
  18. $("#helpPageContent").height(height);
  19. }
  20. function viewHelpPage(id) {
  21. if (!id) return;
  22. $.ajax({
  23. url: '@Url.Action("ViewHelpPage", "Misc")',
  24. data: { Id: id },
  25. success: function (response) {
  26. setTimeout(function () {
  27. $("#helpPageContent").html(response);
  28. }, 200);
  29. },
  30. error: function () {
  31. alert("error occured");
  32. }
  33. });
  34. }
  35. function editHelpPage(id) {
  36. if (!id) return;
  37. $.ajax({
  38. url: '@Url.Action("EditHelpPage", "Misc")',
  39. data: { Id: id },
  40. success: function (response) {
  41. setTimeout(function () {
  42. $("#helpPageContent").html(response);
  43. }, 200);
  44. },
  45. error: function () {
  46. alert("error occured");
  47. }
  48. });
  49. }
  50. </script>
  51. <link rel="stylesheet" type="text/css" href='@Url.Content("~/Content/jquery.mCustomScrollbar.min.css")' />
  52. <style>
  53. .helpTable {
  54. width: 100%;
  55. }
  56. .helpTable > tbody > tr > td {
  57. vertical-align: top;
  58. }
  59. .helpTable > tbody > tr > td:first-of-type {
  60. padding-right: 12px;
  61. }
  62. .helpTable > tbody > tr > td:last-of-type {
  63. padding-left: 12px;
  64. }
  65. .helpTable > tbody > tr > td:first-of-type ul {
  66. line-height: 24px;
  67. font-size: 16px;
  68. list-style-type: none;
  69. padding-left: 12px;
  70. }
  71. .helpTable > tbody > tr > td:first-of-type ul > ul {
  72. font-size: 16px;
  73. }
  74. .helpTable > tbody > tr > td:first-of-type ul > ul > ul {
  75. font-size: 16px;
  76. }
  77. .helpTable > tbody > tr > td:first-of-type ul a {
  78. text-decoration: none;
  79. }
  80. .helpTable > tbody > tr > td:first-of-type li {
  81. margin-left: 8px;
  82. }
  83. .helpPageMenu {
  84. width: auto;
  85. margin: 0 8px 6px 0;
  86. padding-bottom: 6px;
  87. border-bottom: 1px dashed #009688;
  88. }
  89. #helpPageNavigation {
  90. border-right: 1px solid #009688;
  91. }
  92. </style>
  93. <table class="helpTable">
  94. <tr>
  95. <td style="width: 20%">
  96. <div class="helpPageMenu">
  97. @Html.DevExpress().Button(b =>
  98. {
  99. b.Name = "devButtonNewHelpPage";
  100. b.Text = "Neu";
  101. b.UseSubmitBehavior = false;
  102. b.RenderMode = ButtonRenderMode.Link;
  103. b.ClientSideEvents.Click = "function (s, e) { editHelpPage(-1); }";
  104. }).GetHtml()
  105. </div>
  106. <div id="helpPageNavigation" class="mCustomScrollbar" data-mcs-theme="minimal-dark" style="width: 100%">
  107. @Html.Partial("~/Views/Misc/_HelpPageTreePartial.cshtml", Model)
  108. </div>
  109. </td>
  110. <td style="width: 80%">
  111. <div id="helpPageContent" class="mCustomScrollbar" data-mcs-theme="minimal-dark" style="width: 100%">
  112. </div>
  113. </td>
  114. </tr>
  115. </table>