This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,203 @@
@using Kreta.Web.Areas.TanuloErtekeles.Controllers
@using Kreta.Web.Areas.TanuloErtekeles.Models.TanuloErtekeles
@using Kreta.Web.Helpers
@model ErtekelesEditModel
@{
var formName = ErtekelesController.EditPopupFormName;
}
<script type="text/javascript">
$(document).ready(function () {
ErtekelesHelper.setErtekelesTemaEditLabelText();
TanuloErtekelesHelper.setErtekelesNyelviesitesVisibility("@Model.TipusIdEdit", ".nyelviesitesDiv");
});
$("#TipusIdEdit").change(function () {
ErtekelesHelper.setPopupErtekelesModIdVisibility(false);
ErtekelesHelper.setErtekelesTemaEditLabelText();
TanuloErtekelesHelper.setErtekelesNyelviesitesVisibility($("#TipusIdEdit").val(), ".nyelviesitesDiv");
});
</script>
@using (Html.KretaForm(formName))
{
@Html.HiddenFor(x => x.IdEdit)
@Html.HiddenFor(x => x.TanuloIdEdit)
@Html.HiddenFor(x => x.DatumMinValueEdit)
@Html.HiddenFor(x => x.OsztalyCsoportIdEdit)
@Html.HiddenFor(x => x.TantargyIdEdit)
@Html.KretaValidationSummary()
<div class="container-fluid details">
<div class="row">
@Html.KretaLabelFor(x => x.ErtekeloNyomtatasiNevEdit, 3, 3)
</div>
<div class="row">
@Html.KretaDatePickerFor(x => x.DatumEdit).Min(Model.DatumMinValueEdit > DateTime.Today ? DateTime.Today : Model.DatumMinValueEdit).Max(DateTime.Today).RenderWithName(3, 3)
</div>
<div class="row">
<div @(Model.IsFromSzervezet ? "class=disabledItem" : string.Empty)>
@Html.KretaComboBoxFor(x => x.TipusIdEdit, Model.TipusList).RenderWithName(3, 3)
</div>
<div id="divErtekelesModIdEdit">
@Html.KretaComboBoxFor(x => x.ErtekelesModIdEdit, Model.ErtekelesModList).RenderWithName(3, 3)
</div>
</div>
<div class="row">
@Html.KretaTextBoxFor(x => x.ErtekelesTemaEdit, new Dictionary<string, object> { { "maxlength", 2000 } }).RenderWithName(3, 9)
@if (Model.IsNyelviesitesActive)
{
if (Model.IsNemetNemzetiDokumentumNyelvActive)
{
<div class="nyelviesitesDiv hideNyelviesites">
@Html.KretaTextBoxFor(x => x.ErtekelesTemaNemetEdit, new Dictionary<string, object> { { "maxlength", 2000 } }).RenderWithName(3, 9)
</div>
}
if (Model.IsHorvatNemzetiDokumentumNyelvActive)
{
<div class="nyelviesitesDiv hideNyelviesites">
@Html.KretaTextBoxFor(x => x.ErtekelesTemaHorvatEdit, new Dictionary<string, object> { { "maxlength", 2000 } }).RenderWithName(3, 9)
</div>
}
if (Model.IsRomanNemzetiDokumentumNyelvActive)
{
<div class="nyelviesitesDiv hideNyelviesites">
@Html.KretaTextBoxFor(x => x.ErtekelesTemaRomanEdit, new Dictionary<string, object> { { "maxlength", 2000 } }).RenderWithName(3, 9)
</div>
}
if (Model.IsSzerbNemzetiDokumentumNyelvActive)
{
<div class="nyelviesitesDiv hideNyelviesites">
@Html.KretaTextBoxFor(x => x.ErtekelesTemaSzerbEdit, new Dictionary<string, object> { { "maxlength", 2000 } }).RenderWithName(3, 9)
</div>
}
}
</div>
@if (Model.IsErtekelesOsztalyzatIdSelected)
{
<div class="row">
<div class="col-xs-3">
@Html.LabelFor(x => x.ErtekelesOsztalyzatIdEdit, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
</div>
<div class="col-xs-9">
@Html.KretaSelectorFor(x => x.ErtekelesOsztalyzatIdEdit, Model.OsztalyzatList)
</div>
</div>
}
@if (Model.IsErtekelesSzovegSelected)
{
<div class="row">
@Html.KretaTextBoxFor(x => x.ErtekelesSzovegRovidNevEdit, new Dictionary<string, object> { { "maxlength", 3 } }).RenderWithName(3, 2)
</div>
<div class="row">
<div class="col-xs-3">
@Html.LabelFor(x => x.ErtekelesSzovegEdit, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
</div>
<div class="col-xs-9">
@(Html.KretaHtmlEditorFor(m => m.ErtekelesSzovegEdit, false)
.Resizable(false)
.PasteCleanup(p => p.All(false))
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.SubScript()
.SuperScript()))
</div>
</div>
if (Model.IsNyelviesitesActive)
{
if (Model.IsNemetNemzetiDokumentumNyelvActive)
{
<div class="row nyelviesitesDiv hideNyelviesites">
<div class="col-xs-3">
@Html.LabelFor(x => x.ErtekelesSzovegNemetEdit, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
</div>
<div class="col-xs-9">
@(Html.KretaHtmlEditorFor(m => m.ErtekelesSzovegNemetEdit, false)
.Resizable(false)
.PasteCleanup(p => p.All(false))
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.SubScript()
.SuperScript()))
</div>
</div>
}
if (Model.IsHorvatNemzetiDokumentumNyelvActive)
{
<div class="row nyelviesitesDiv hideNyelviesites">
<div class="col-xs-3">
@Html.LabelFor(x => x.ErtekelesSzovegHorvatEdit, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
</div>
<div class="col-xs-9">
@(Html.KretaHtmlEditorFor(m => m.ErtekelesSzovegHorvatEdit, false)
.Resizable(false)
.PasteCleanup(p => p.All(false))
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.SubScript()
.SuperScript()))
</div>
</div>
}
if (Model.IsRomanNemzetiDokumentumNyelvActive)
{
<div class="row nyelviesitesDiv hideNyelviesites">
<div class="col-xs-3">
@Html.LabelFor(x => x.ErtekelesSzovegRomanEdit, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
</div>
<div class="col-xs-9">
@(Html.KretaHtmlEditorFor(m => m.ErtekelesSzovegRomanEdit, false)
.Resizable(false)
.PasteCleanup(p => p.All(false))
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.SubScript()
.SuperScript()))
</div>
</div>
}
if (Model.IsSzerbNemzetiDokumentumNyelvActive)
{
<div class="row nyelviesitesDiv hideNyelviesites">
<div class="col-xs-3">
@Html.LabelFor(x => x.ErtekelesSzovegSzerbEdit, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
</div>
<div class="col-xs-9">
@(Html.KretaHtmlEditorFor(m => m.ErtekelesSzovegSzerbEdit, false)
.Resizable(false)
.PasteCleanup(p => p.All(false))
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.SubScript()
.SuperScript()))
</div>
</div>
}
}
}
@if (Model.IsErtekelesSzazalekSelected)
{
<div class="row">
@Html.KretaNumericFor(x => x.ErtekelesSzazalekEdit).Min(0).Max(100).RenderWithName(3, 3)
</div>
}
</div>
}

View file

@ -0,0 +1,173 @@
@using Kreta.BusinessLogic.Classes
@using Kreta.Enums.ManualEnums
@using Kreta.Web.Areas.TanuloErtekeles.Controllers
@using Kreta.Web.Areas.TanuloErtekeles.Models.TanuloErtekeles
@using Kreta.Web.Helpers
@using Kreta.Web.Helpers.Grid
@model ErtekelesDetailModel
@{
var gridName = Model.NamePrefix + BaseTanuloErtekelesController.DetailGridName + Model.ID;
var javascriptClassName = gridName + "Helper";
var fotargyAltargyGridName = Model.NamePrefix + ErtekelesController.FotargyAltargyGridName + Model.ID;
var ertekelesDetailTooltipClassName = "tanuloErtekelesDetailKendoTooltip";
var ertekelesDetailTooltipDataAttributeName = "ertekelestext";
var ertekelesDetailTooltipTemplateId = "kendoTooltip-ertekelesDetailKendoTooltipTemplate";
}
<script>
var @javascriptClassName = (function () {
var gridDetailHelper = function () { };
gridDetailHelper.ertekelesDetailDataBoundAdditionalFunction = function () {
TanuloErtekelesHelper.setDetailGridRowAthuzas("@gridName");
var tanuloErtekelesKendoTooltip = $("." + "@ertekelesDetailTooltipClassName");
KretaTooltipHelper.setTooltip(tanuloErtekelesKendoTooltip, "#" + "@ertekelesDetailTooltipTemplateId");
}
gridDetailHelper.aktivTanuloErtekeles = function (rowData) {
var isLezartOsztalyCsoport = ErtekelesHelper.isLezartOsztalyCsoport();
var result = !rowData.Torolt_BOOL && rowData.Modosithato_BOOL && rowData.ModosithatoByNaplozaras && !isLezartOsztalyCsoport;
return result;
}
gridDetailHelper.fotargyAltargyDataBoundAdditionalFunction = function () {
var tanuloErtekelesKendoTooltip = $(".tanuloErtekelesKendoTooltip_" + "@Model.ID");
var toolTipTemplateSelector = "#kendoTooltip-fotargyAltargyErtekelesTemplate_" + "@Model.ID";
KretaTooltipHelper.setTooltip(tanuloErtekelesKendoTooltip, toolTipTemplateSelector);
tanuloErtekelesKendoTooltip.click(function () {
var modosithato = $(this).attr("data-modosithato");
var isLezartOsztalyCsoport = ErtekelesHelper.isLezartOsztalyCsoport();
if (CommonUtils.parseBool(modosithato) && !isLezartOsztalyCsoport) {
var ertekelesId = $(this).attr("data-tanuloertekelesid");
if (!CommonUtils.isNullOrEmpty(ertekelesId)) {
var data = { Id: ertekelesId };
KretaTooltipHelper.hidaAllTooltips();
ErtekelesHelper.openModifyErtekelesWindow(data);
}
}
});
$("#FotargyAltargy_" + @Model.ID + "ErtekelesGrid td.atlag").each(function () {
var atlagText = $(this).html();
if (!CommonUtils.isNullOrEmpty(atlagText)) {
var atlag = parseFloat(atlagText);
if (atlag < 2) {
$(this).html("<span class='spanAtlagFigyelmeztetes'>" + atlagText + "</span>");
}
}
});
}
return gridDetailHelper;
})();
</script>
@if (Model.HasFotargyAltargy)
{
<div>
@(
Html.KretaGrid<TanuloErtekelesByTanuloGridModel>(
fotargyAltargyGridName,
new GridApiUrl("ErtekelesApi", "GetFotargyAltargyErtekelesGrid", new Dictionary<string, string>
{
{ "TanuloId", Model.ID },
{ "TantargyId", Model.TantargyId.ToString() },
{ "Datum", Model.Datum != null ? Model.Datum.ToString() : null },
{ "FeladatKategoriaId", Model.FeladatKategoriaId.ToString() }
}),
dataBoundAdditionalFunction: javascriptClassName + ".fotargyAltargyDataBoundAdditionalFunction();",
allowFilterable: false,
allowSorting: false,
allowScrolling: false,
allowPaging: false,
pageSizes: null,
useToolBar: false
)
.TableHtmlAttributes(new { @class = "TanuloErtekelesGrid" })
.Columns(columns =>
{
columns.Bound(m => m.TantargyNev).HeaderTemplate(
@<text>
<span class="k-link">
@( TanuloErtekelesResource.FotargyAltargy)
</span>
</text>);
columns.Bound(m => m.Szeptember).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.Oktober).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.November).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.December).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.JanuarI).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.I).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap kozepre" });
columns.Bound(m => m.JanuarII).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.Februar).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.Marcius).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.Aprilis).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.Majus).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.Junius).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap" });
columns.Bound(m => m.II).Encoded(false).HeaderHtmlAttributes(new { @class = "honap" }).HtmlAttributes(new { @class = "honap kozepre" });
columns.Bound(m => m.Atlag).Encoded(false).HeaderHtmlAttributes(new { @class = "atlag" }).HtmlAttributes(new { @class = "atlag kozepre" }).Hidden(!Model.IsJegyekAtlagaMegjelenik).Format("{0:0.00}");
columns.Template(@<text>&nbsp;</text>).HeaderTemplate(@<text>&nbsp;</text>).Width(300); @*NOTE: ez egy blank Column, hogy a design ne csússzon szét*@
})
)
</div>
}
@Html.KretaTooltipTemplate("kendoTooltip-fotargyAltargyErtekelesTemplate_" + Model.ID,
@"<div class='kendoTooltip' style='#=target.data('tooltipstyle')#'>
<div class='tooltipTanuloErtekeles'>#:target.data('tanuloertekeles')#</div>
<p class='tooltipText'>#:target.data('datum')#</p>
<p class='tooltipText'>#:target.data('tipusmod')#</p>
<p class='tooltipText'>#:target.data('ertekelestema')#</p>
<p class='tooltipText'>#:target.data('suly')#</p>
<p class='tooltipText'>#:target.data('ertekelonyomtatasinev')#</p>
</div>")
<div>
@{
var gridApiUrl = new GridApiUrl("ErtekelesApi", "GetErtekelesDetailGrid", new Dictionary<string, string>
{
{ "TanuloId", Model.ID },
{ "TantargyId", Model.TantargyId.ToString() },
{ "Datum", Model.Datum != null ? Model.Datum.ToString() : null },
{ "FeladatKategoriaId", Model.FeladatKategoriaId.ToString() }
});
var rowFunctionList = new List<RowFunction>
{
new RowFunction {NameResourceId = 116 /*Módosítás*/, ClientAction = "ErtekelesHelper.openEditWindow", IconEnum = GridRowFunctionIconEnum.Modositas},
new RowFunction {NameResourceId = 117 /*Törlés*/, ClientAction = "ErtekelesHelper.deleteConfirmWindow", IconEnum = GridRowFunctionIconEnum.Torles}
};
}
@(
Html.KretaGrid<ErtekelesDetailGridModel>(
gridName,
gridApiUrl,
useToolBar: false,
allowPaging: false,
pageSizes: null,
dataBoundAdditionalFunction: javascriptClassName + ".ertekelesDetailDataBoundAdditionalFunction();"
)
.TableHtmlAttributes(new { @class = "TanuloErtekelesDetailGrid" })
.Columns(columns =>
{
columns.Bound(c => c.Datum).Width("90px").Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
columns.Bound(c => c.ErtekeloNyomtatasiNev).Width("12%").SetDisplayPropertyWithToolip("ErtekeloNyomtatasiNev");
columns.Bound(c => c.TipusId_DNAME).Width("12%").SetDisplayPropertyWithToolip("TipusId_DNAME");
columns.Bound(c => c.TipusId).Visible(false);
columns.Bound(c => c.ErtekelesModId_DNAME).Width("12%").SetDisplayPropertyWithToolip("ErtekelesModId_DNAME");
columns.Bound(c => c.RogzitesDatum).Width("90px").Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
columns.Bound(c => c.ErtekelesText).SetHtmlDisplayPropertyWithToolip("ErtekelesText", ertekelesDetailTooltipClassName, ertekelesDetailTooltipDataAttributeName, "MagatartasSzorgalomSortores").HeaderHtmlAttributes(new { @class = "headerWidthFix" }).Sortable(false);
columns.Bound(c => c.ErtekelesTema).SetDisplayPropertyWithToolip("ErtekelesTema").HeaderHtmlAttributes(new { @class = "headerWidthFix" });
})
.ConditionalRowFunction(Html, rowFunctionList, javascriptClassName + ".aktivTanuloErtekeles")
)
</div>
@Html.KretaTooltipTemplate(ertekelesDetailTooltipTemplateId,
@"<div class='kendoTooltip'>
<p class='tooltipText'>#=target.data('" + ertekelesDetailTooltipDataAttributeName + @"')#</p>
</div>")

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,51 @@
@using Kreta.Web.Areas.TanuloErtekeles.Controllers
@using Kreta.Web.Areas.TanuloErtekeles.Models.TanuloErtekeles
@model ErtekelesStartPopupModel
@{
var formName = ErtekelesController.StartPopupFormName;
var keresoSzuroDivClass = Model.ErtekelesKeresoSzuroList.Count > 1 ? string.Empty : "hidden";
}
@using (Html.KretaForm(formName))
{
@Html.KretaValidationSummary()
@Html.HiddenFor(m => m.ErtekelesKeresoAdatTipus)
<div class="container-fluid details">
<div class="@keresoSzuroDivClass">
@Html.KretaSelectorFor(m => m.ErtekelesKeresoSzuro, Model.ErtekelesKeresoSzuroList, false, "ErtekelesHelper.keresoSzuroOnClick")
</div>
<div @(Model.IsFromSzervezet ? "class=disabledItem" : string.Empty)>
@Html.KretaComboBoxFor(m => m.TipusId, Model.TipusList).RenderWithName(4, 8, true)
</div>
<div id="startPopupFoglalkozas">
@Html.KretaDropdownListFor(x => x.FoglalkozasId, Model.FoglalkozasList, addOptionLabel: false).RenderWithName(4, 8, true)
</div>
<div id="startPopupFotargyi">
@Html.KretaDropdownListFor(x => x.FotargyFoglalkozasId, Model.FotargyiFoglalkozasList, addOptionLabel: false).RenderWithName(4, 8, true)
</div>
<div id="startPopupOsztalyCsoport">
<div>
@Html.KretaDropdownListFor(x => x.OsztalyCsoportId, new List<SelectListItem>(), addOptionLabel: false).RenderWithName(4, 8, true)
</div>
<div>
@Html.KretaDropdownListFor(x => x.TantargyId, Model.TantargyList, addOptionLabel: false).RenderWithName(4, 8, true)
</div>
</div>
<br />
<div align="center">
@Html.KretaButton("StartTovabbButton", CommonResource.Tovabb).Events(e => e.Click("ErtekelesHelper.startTovabb"))
</div>
</div>
}