| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- @{
- Layout = "~/Views/Shared/_FunctionLayout.cshtml";
- }
- @model IEnumerable<GreenTree.Nachtragsmanagement.Web.Models.Misc.LogDataModel>
- <script>
- var gridScrollHeight;
- var gridScrollOffset = 250;
- var resizeFinished;
- $(document).ready(function () {
- gridScrollHeight = calculateGridScrollHeight();
- setTimeout(function () {
- devGridViewLog.PerformCallback();
- }, 500);
- });
- $(window).resize(function () {
- clearTimeout(window.resizedFinished);
- window.resizedFinished = setTimeout(function () {
- setGridScrollHeight();
- }, 250);
- });
- function calculateGridScrollHeight() {
- var windowHeight = $(window).height();
- var gridHeaderHeight = $("#devGridViewLog_DXHeadersRow0").height();
- var gridFooterHeight = $("#devGridViewLog_DXFooterRow").height();
- return windowHeight - gridHeaderHeight - gridFooterHeight - gridScrollOffset;
- }
- function setGridScrollHeight() {
- gridScrollHeight = calculateGridScrollHeight();
- devGridViewLog.PerformCallback();
- }
- function onToolbarItemClick(s, e) {
- if (!s || !e) return;
- if (e.item.name == "Print") {
- parent.$(".printPopupContainer").remove();
- $.ajax({
- type: "POST",
- url: '@Url.Action("ExportPartialLogs", "Misc")',
- data: { displayMode: "popup", exportFormat: "" },
- success: function (response) {
- parent.$("body").append(response);
- parent.exportFormat = "pdf";
- }
- });
- } else if (e.item.name == "ToggleColumnChooser") {
- if (devGridViewLog.IsCustomizationWindowVisible())
- devGridViewLog.HideCustomizationWindow();
- else
- devGridViewLog.ShowCustomizationWindow();
- } else if (e.item.name == "ResetSettings") {
- $.ajax({
- type: "POST",
- url: '@Url.Action("DeleteCookiesSessionVariablesAndUserConfigs", "Global")',
- data: {
- cookies: ["logGridStateCookie"],
- sessionVariables: ["LogGridState", "LogGridViewState"],
- userConfigItemNames: ["LogGridLayoutState"]
- },
- success: function (response) {
- if (response == "success") {
- window.location = window.location;
- }
- }
- });
- }
- }
- function viewLog(id) {
- if (!id) return;
- $.ajax({
- url: '@Url.Action("viewLog", "Misc")',
- data: { Id: id },
- success: function (response) {
- setTimeout(function () {
- $(".logViewContainer").remove();
- $("body").append(response);
- }, 200);
- },
- error: function () {
- alert("error occured");
- }
- });
- }
- function deleteLog(id) {
- $.ajax({
- type: "POST",
- url: '@Url.Action("DeleteLog", "Misc")',
- data: { Id: id },
- success: function (response) {
- setTimeout(function () {
- devGridViewLog.PerformCallback();
- }, 200);
- },
- error: function () {
- alert("error occured");
- }
- });
- }
- </script>
- @Html.Partial("~/Views/Misc/_LogGridPartial.cshtml", Model)
|