init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,89 @@
|
|||
@using Kreta.Web.Security
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Web.Areas.Hianyzas.Models;
|
||||
@using Kreta.Web.Areas.Hianyzas.Models.Mulasztasok
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid;
|
||||
|
||||
@model MulasztasokTanuloNezetGridModel
|
||||
|
||||
@{
|
||||
var gridName = "MulasztasokTanuloNezetDetailGrid_" + Model.TanuloId;
|
||||
var javascriptClassName = gridName + "Helper";
|
||||
var parentGridName = "MulasztasokTanuloNezetGrid";
|
||||
var parentFormName = "MulasztasokSearchForm";
|
||||
}
|
||||
|
||||
@{
|
||||
var rowFunctionList = new List<RowFunction>();
|
||||
if ((ClaimManager.HasPackage("Osztalyfonok") || Model.SzervezetTipusId.HasValue && Model.SzervezetTipusId == (int)SzervezetTipusEnum.Dualis) && Model.GridHasDelete)
|
||||
{
|
||||
rowFunctionList.Add(new RowFunction
|
||||
{
|
||||
Name = CommonResource.Torles, ClientAction = string.Format(@"function(e) {{ MulasztasKezelesHelper.deleteConfirmWindow(e, ['{0}'], '{1}'); }}", parentGridName, parentFormName), IconEnum = GridRowFunctionIconEnum.Torles
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
<div id="partialDetailGridTanulo_@Model.TanuloId.ToString()">
|
||||
@(
|
||||
Html.KretaGrid<MulasztasGridModel>(
|
||||
gridName,
|
||||
new GridApiUrl(Model.ApiControllerName, "GetMulasztasokTanuloNezetDetailGrid", new Dictionary<string, string> { { "tanuloId", Model.TanuloId.ToString() }, { "osztalyCsoportId", Model.OsztalyCsoportId.ToString()} }),
|
||||
useToolBar: false,
|
||||
allowPaging: false,
|
||||
pageSizes: null,
|
||||
dataBoundAdditionalFunction: javascriptClassName + ".disableRow();",
|
||||
sort: (sort =>
|
||||
{
|
||||
sort.Add(m => m.Datum).Descending();
|
||||
sort.Add(m => m.Oraszam).Ascending();
|
||||
})
|
||||
)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.Datum).Width("90px").Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
||||
columns.Bound(c => c.Oraszam).Width("5%");
|
||||
columns.Bound(c => c.OsztCsopNev).Width("15%");
|
||||
columns.Bound(c => c.TargyNev).Width("15%");
|
||||
columns.Bound(c => c.MulTip_DNAME).Width("10%");
|
||||
columns.Bound(c => c.KesesPerc).Width("8%");
|
||||
columns.Bound(c => c.Igazolt_BNAME).Width("7%");
|
||||
columns.Bound(c => c.IgazolasTipus_DNAME).Width("13%");
|
||||
columns.Bound(c => c.IgazolasMegjegyzes).SetDisplayPropertyWithToolip("IgazolasMegjegyzes");
|
||||
columns.Bound(c => c.IsMulasztasKezelheto).Hidden();
|
||||
})
|
||||
.ConditionalRowFunction(Html, rowFunctionList, javascriptClassName + ".removeFirstRowDeleteButton")
|
||||
)
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var @javascriptClassName = (function () {
|
||||
var gridDetailHelper = function () { };
|
||||
|
||||
//TODO: Ezt lehet majd törölni, ha sikerül máshogy megoldani az összes elem módosítását a gridben!
|
||||
gridDetailHelper.removeFirstRowDeleteButton = function (rowData) {
|
||||
var result = rowData.id !== "0" && CommonUtils.parseBool("@ClaimData.IsModosithatjaOsztfoMulasztasokat");
|
||||
return result;
|
||||
}
|
||||
|
||||
gridDetailHelper.disableRow = function () {
|
||||
var grid = $('#@gridName');
|
||||
grid.find('tbody tr').each(function () {
|
||||
var dataItem = grid.data('kendoGrid').dataItem(this);
|
||||
if (dataItem.IsMulasztasKezelheto !== true) {
|
||||
$(this).addClass('disabledItem');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return gridDetailHelper;
|
||||
})();
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue