init
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
@using Kreta.Web.Helpers.Grid;
|
||||
@using Kreta.Web.Areas.Adatszolgaltatasok.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Resources
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
@model MerohelyGridModel
|
||||
|
||||
<div id="partialDetailGridTanulo_@Model.MerohelyId.ToString()" style="padding-top:10px">
|
||||
@{
|
||||
var rowFunctionList = new List<RowFunction>
|
||||
{
|
||||
new RowFunction { Name = KozmuAdatszolgaltatasResource.FeltoltottKepMegtekintese, ClientAction= "MerohelyHelper.OpenMeroallasImagePopup", IconEnum = GridRowFunctionIconEnum.Kep },
|
||||
};
|
||||
var defaultRowFunctionList = new List<RowFunction>
|
||||
{
|
||||
new RowFunction { Name = IntezmenyResource.Modositas, ClientAction= "MerohelyHelper.OpenMeroallasModositasPopup", IconEnum = GridRowFunctionIconEnum.Modositas },
|
||||
new RowFunction { Name = IntezmenyResource.Torles, ClientAction= "MerohelyHelper.DeleteMeroallasConfirmWindow", IconEnum = GridRowFunctionIconEnum.Torles }
|
||||
};
|
||||
|
||||
}
|
||||
@(
|
||||
Html.KretaGrid<MeroAllasGridModel>(
|
||||
"MeroallasDetailGrid_" + Model.MerohelyId,
|
||||
new GridApiUrl("MerohelyApi", "GetMeroallasDetailGrid", new Dictionary<string, string> { { "merohelyId", Model.MerohelyId.ToString() } }),
|
||||
useToolBar: false,
|
||||
allowPaging: false,
|
||||
allowScrolling: false,
|
||||
showSorszam: false
|
||||
)
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true))
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(c => c.MeroallasId).Hidden();
|
||||
columns.Bound(c => c.Ertek);
|
||||
columns.Bound(c => c.LeolvasasDatuma).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
||||
columns.Bound(c => c.KeppelRendelkezik_BNAME);
|
||||
})
|
||||
.ConditionalRowFunction(Html, rowFunctionList, "DetailGridHelper.setRowEditing")
|
||||
.RowFunction(Html, defaultRowFunctionList)
|
||||
|
||||
.FunctionCommand(Html, new List<FunctionCommand>
|
||||
{
|
||||
new FunctionCommand { Name = IntezmenyResource.Uj, ClientAction = "function() { MerohelyHelper.OpenMeroallasUjPopup(" + Model.MerohelyId + "); }"}
|
||||
})
|
||||
)
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var DetailGridHelper = (function () {
|
||||
var detailGridHelper = function () { };
|
||||
detailGridHelper.setRowEditing = function (rowData) {
|
||||
return rowData.KeppelRendelkezik_BOOL;
|
||||
}
|
||||
return detailGridHelper;
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
td.rowFunction > a > i.fa-image {
|
||||
float: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.rowFunction {
|
||||
text-align: left !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user