155 lines
6.2 KiB
Text
155 lines
6.2 KiB
Text
@using Kreta.Enums.ManualEnums
|
|
@using Kreta.Web.Areas.Adminisztracio.Controllers
|
|
@using Kreta.Web.Areas.Adminisztracio.Models
|
|
@using Kreta.Web.Helpers.Grid
|
|
@model TanuloErtekelesMondatbankSearchModel
|
|
|
|
@{
|
|
Layout = null;
|
|
}
|
|
|
|
@{
|
|
string gridName = SystemSettingsController.TanuloErtekelesMondatbankGridName;
|
|
|
|
var functionCommandList = new List<FunctionCommand>
|
|
{
|
|
new FunctionCommand {Name = CommonResource.Uj, ClientAction = "TanuloErtekelesMondatbankHelper.openNewTanuloErtekelesMondatbankItemPopup"},
|
|
new FunctionCommand {Name = CommonResource.Modositas, ClientAction = "TanuloErtekelesMondatbankHelper.modifySelectedTanuloErtekelesMondatbankItems"},
|
|
new FunctionCommand {Name = CommonResource.KijeloltekTorlese, ClientAction = "TanuloErtekelesMondatbankHelper.deleteSelectedTanuloErtekelesMondatbankItems", Classes = "kendo-gridFunctionKommandRed"}
|
|
};
|
|
|
|
var rowFunctionList = new List<RowFunction>
|
|
{
|
|
new RowFunction {Name = CommonResource.Modositas, ClientAction = "TanuloErtekelesMondatbankHelper.openModifyTanuloErtekelesMondatbankItemPopup", IconEnum = GridRowFunctionIconEnum.Modositas},
|
|
new RowFunction {Name = CommonResource.Torles, ClientAction = "TanuloErtekelesMondatbankHelper.deleteTanuloErtekelesMondatbankItemConfirmWindow", IconEnum = GridRowFunctionIconEnum.Torles}
|
|
};
|
|
|
|
var grid = Html.KretaGrid<TanuloErtekelesMondatbankGridModel>(
|
|
gridName,
|
|
new GridApiUrl("SystemSettingsApi", "GetTanuloErtekelesMondatbankGrid"),
|
|
sort: sort =>
|
|
{
|
|
sort.Add(m => m.RovidNev).Ascending();
|
|
},
|
|
pageSizes: null,
|
|
allowPaging: false,
|
|
useToolBar: false,
|
|
dataParameterFunction: "searchFormPopup"
|
|
)
|
|
.SelectBoxColumn(Html, string.Empty)
|
|
.Columns(column =>
|
|
{
|
|
column.Bound(c => c.ID).Hidden(true);
|
|
column.Bound(c => c.RovidNev).Width("10%").SetDisplayPropertyWithToolip("RovidNev");
|
|
column.Bound(c => c.Szoveg).SetDisplayPropertyWithToolip("Szoveg");
|
|
column.Bound(c => c.TanuloErtekelesTipusId_DNAME).Width("15%").SetDisplayPropertyWithToolip("TanuloErtekelesTipusId_DNAME");
|
|
column.Bound(c => c.EvfolyamTipusId_DNAME).Width("15%").SetDisplayPropertyWithToolip("EvfolyamTipusId_DNAME");
|
|
column.Bound(c => c.TantargyNev).Width("15%").SetDisplayPropertyWithToolip("TantargyNev");
|
|
})
|
|
.RowFunction(Html, rowFunctionList)
|
|
.FunctionCommand(Html, functionCommandList)
|
|
.Resizable(resize => resize.Columns(true))
|
|
.Sortable(sortable => sortable
|
|
.AllowUnsort(true)
|
|
.SortMode(GridSortMode.MultipleColumn));
|
|
}
|
|
|
|
<style>
|
|
#layout_slidePanel {
|
|
display: flex;
|
|
}
|
|
|
|
#searchFormPopup::after {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
@@media (max-width: 1250px) {
|
|
#layout_slidePanel {
|
|
display: block;
|
|
width: 100vw;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<div id="layout_slidePanel" class="content-content" data-open="true">
|
|
<div class="sidebar-container sidebar-open">
|
|
@using (Html.SearchPanelSideBar("searchFormPopup", gridName))
|
|
{
|
|
@Html.KretaMultiSelectFor(x => x.TanuloErtekelesTipusIdList, Model.TipusList).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaMultiSelectFor(x => x.EvfolyamTipusIdList, Model.EvfolyamTipusList).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaMultiSelectFor(x => x.TantargyIdList, Model.TantargyList).AutoBind(true).RenderSearchPanelSideBar()
|
|
@Html.KretaTextBoxFor(x => x.RovidNevS).RenderSearchPanelSideBar()
|
|
@Html.KretaTextBoxFor(x => x.SzovegS).RenderSearchPanelSideBar()
|
|
}
|
|
@Html.KretaNotification("popupNotificationOnPopup").AppendTo("#popupContentContainer")
|
|
|
|
</div>
|
|
<div class="content-container sidebar-open" id="popupContentContainer">
|
|
<div class="k-content">
|
|
<div class="container-fluid details">
|
|
<div>
|
|
@(grid)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$("#searchPanelBtn").click(function () {
|
|
var popup = $('#popupNotificationOnPopup').data('kendoNotification');
|
|
if (popup)
|
|
{
|
|
popup.hide();
|
|
}
|
|
|
|
KretaGridHelper.refreshGridSearchPanel("@gridName", "searchFormPopup");
|
|
$("#@gridName").removeClass("disabledGrid");
|
|
});
|
|
$(document).ready(function () {
|
|
document.addEventListener("keydown", onKeyDown, false);
|
|
|
|
function onKeyDown(e) {
|
|
if (e.keyCode == 13) {
|
|
var searchbutton = $("#searchPanelBtn");
|
|
if (searchbutton != null && searchbutton.length == 1 && $(document.activeElement).parents("#searchFormPopup").length == 1) {
|
|
MasterLayout.searchWithEnter = true;
|
|
searchbutton.click();
|
|
}
|
|
}
|
|
}
|
|
|
|
searchPanelGlobalChangeEvent();
|
|
});
|
|
function searchPanelGlobalChangeEvent() {
|
|
var searchpanel = $("#layout_SearchPanelContainer");
|
|
if (searchpanel.length < 1) { return; }
|
|
var gridname = searchpanel.attr("data-gridId");
|
|
var serchpanelItems = searchpanel.find("input");
|
|
serchpanelItems.unbind("change.Kreta");
|
|
serchpanelItems.bind("change.Kreta", function () {
|
|
if (MasterLayout.searchWithEnter) {
|
|
MasterLayout.searchWithEnter = false;
|
|
return;
|
|
}
|
|
|
|
var offset = $('#' + gridname).closest('.content-container').offset();
|
|
$("#" + gridname).addClass("disabledGrid");
|
|
var popupNotification = $('#popupNotificationOnPopup').data('kendoNotification');
|
|
popupNotification.hide();
|
|
popupNotification.setOptions({
|
|
position: {
|
|
top: offset.top,
|
|
left: offset.left,
|
|
right: 15
|
|
},
|
|
stacking: "up",
|
|
autoHideAfter: 0,
|
|
width: $('#' + gridname).closest('.content-container').width()
|
|
});
|
|
popupNotification.show(Globalization.KeresesFigyelmeztetes, 'warning');
|
|
$('.k-widget .k-notification').css({ "position": "absolute", "z-index": "1000000"});
|
|
});
|
|
}
|
|
</script>
|