init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
312
KretaWeb/Areas/Tanulo/Views/TanuloApaczai/Index.cshtml
Normal file
312
KretaWeb/Areas/Tanulo/Views/TanuloApaczai/Index.cshtml
Normal file
|
@ -0,0 +1,312 @@
|
|||
@using Kreta.Web.Areas.Tanulo.Models
|
||||
@using Kreta.Resources
|
||||
|
||||
@model TanuloApaczaiModel
|
||||
|
||||
<style type="text/css">
|
||||
.k-panelbar .k-item > .k-link.k-header {
|
||||
background-color: #54a5d1;
|
||||
color: black;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.apaczaiMenuAktiv {
|
||||
background-color: forestgreen !important;
|
||||
border-color: forestgreen !important;
|
||||
}
|
||||
|
||||
.apaczaiMenuButton > button.k-button {
|
||||
width: 100%;
|
||||
background-color: lightgray;
|
||||
border-color: lightgray;
|
||||
color: black;
|
||||
text-transform: none;
|
||||
margin-bottom: 2px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.homeTitle {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mainTitle {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
background-color: #518094;
|
||||
border: 2px solid black;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.progressBar > div.k-state-selected {
|
||||
background-color: #808080;
|
||||
border-bottom-color: #808080;
|
||||
border-top-color: #808080;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.progressBar {
|
||||
padding-top: 0px !important;
|
||||
padding-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.benyujtasDokumentum {
|
||||
vertical-align: middle;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.apaczaiContentContainer {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#apaczaiStartPageButton {
|
||||
background-color: #54a5d1;
|
||||
color: black;
|
||||
text-align: center;
|
||||
width: calc(100% - 2px);
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
text-transform: none;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
border-bottom: 1px;
|
||||
margin-bottom: 1px;
|
||||
margin-left: 1px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#ApaczaiMenu {
|
||||
margin-top: 0px;
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
div.GDPR {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.GDPR p {
|
||||
text-align: center;
|
||||
margin: 40px auto;
|
||||
line-height: 145%;
|
||||
font-size: 14pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
height: 21px;
|
||||
background-image: url(../Content/content/images/Information_icon.png);
|
||||
background-size: 12px;
|
||||
background-repeat: no-repeat;
|
||||
width: 12px;
|
||||
display: inline-block;
|
||||
margin: auto 0px;
|
||||
}
|
||||
|
||||
.fileupload-info-icon-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.fileupload-tooltip {
|
||||
bottom: 60px;
|
||||
}
|
||||
|
||||
.fileupload-tooltip-moreoreqthanmax-hatr {
|
||||
bottom: 133px;
|
||||
}
|
||||
|
||||
.fileupload-tooltip-moreoreqthanmax-biz {
|
||||
bottom: 205px;
|
||||
}
|
||||
|
||||
.figyelmezteto-uzenet {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4 class="mainTitle">@TanuloApaczaiResource.MainTitle</h4>
|
||||
|
||||
<div class="@BootsrapHelper.GetSizeClasses(3)">
|
||||
@Html.KretaButton("apaczaiStartPageButton", TanuloApaczaiResource.Kezdolap, clickEventName: "TanuloApaczaiHelper.HomePartial")
|
||||
@Html.Partial("EditorTemplates/PanelBar", Model)
|
||||
</div>
|
||||
<div class="@BootsrapHelper.GetSizeClasses(9) apaczaiContentContainer">
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
TanuloApaczaiHelper.HomePartial();
|
||||
});
|
||||
|
||||
var TanuloApaczaiHelper = (function () {
|
||||
var tanuloApaczaiHelper = function () { };
|
||||
|
||||
var urls = {
|
||||
home: "@Url.Action("HomePartialView", "TanuloApaczai")",
|
||||
alapadatok: "@Url.Action("AlapadatokPartialView", "TanuloApaczai")",
|
||||
elerhetosegek: "@Url.Action("ElerhetosegekPartialView", "TanuloApaczai")",
|
||||
bankszamlaAdatok: "@Url.Action("BankszamlaAdatokPartialView", "TanuloApaczai")",
|
||||
palyazatBenyujtasa: "@Url.Action("PalyazatBenyujtasaPartialView", "TanuloApaczai")",
|
||||
palyazatAllapota: "@Url.Action("PalyazatAllapotaPartialView", "TanuloApaczai")",
|
||||
palyazatiEsemenyek: "@Url.Action("PalyazatiEsemenyekPartialView", "TanuloApaczai")",
|
||||
dokumentumHozzaadasa: "@Url.Action("DokumentumHozzaadasaPartialView", "TanuloApaczai")",
|
||||
dokumentumokMegtekintese: "@Url.Action("DokumentumokMegtekintesePartialView", "TanuloApaczai")",
|
||||
downloadDokumentum: "@Url.Action("DownloadFile", "TanuloApaczai", new { area = "Tanulo" })",
|
||||
palyazatFellebbezes: "@Url.Action("PalyazatFellebbezesPartialView", "TanuloApaczai")",
|
||||
deleteDokumentum: "@Url.Action("DeleteDokumentum", "TanuloApaczai")",
|
||||
eszaAdatlapokMegtekintese: "@Url.Action("EszaAdatlapokMegtekintesePartialView", "TanuloApaczai")"
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.HomePartial = function () {
|
||||
getPartialView(urls.home, {});
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.AlapadatokClick = function (e) {
|
||||
var data = CommonUtils.JSONparse('@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.SajatAdatlapInfo))');
|
||||
getPartialView(urls.alapadatok, data, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.ElerhetosegekClick = function (e) {
|
||||
var data = CommonUtils.JSONparse('@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.CimElerhetoseg))');
|
||||
getPartialView(urls.elerhetosegek, data, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.BankszamlaAdatokClick = function (e) {
|
||||
var data = CommonUtils.JSONparse('@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.SajatAdatlapInfo.TanuloBankszamla))');
|
||||
getPartialView(urls.bankszamlaAdatok, data, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.PalyazatBenyujtasaClick = function (e, manual) {
|
||||
var data = CommonUtils.JSONparse('@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model))');
|
||||
getPartialView(urls.palyazatBenyujtasa, data, e, manual);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.PalyazatAllapotaClick = function (e, manual) {
|
||||
getPartialView(urls.palyazatAllapota, {}, e, manual);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.PalyazatiEsemenyekClick = function (e) {
|
||||
getPartialView(urls.palyazatiEsemenyek, {}, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.DokumentumHozzaadasaClick = function (e) {
|
||||
var data = CommonUtils.JSONparse('@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model))');
|
||||
getPartialView(urls.dokumentumHozzaadasa, data, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.DokumentumokMegtekinteseClick = function (e) {
|
||||
var data = CommonUtils.JSONparse('@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model))');
|
||||
getPartialView(urls.dokumentumokMegtekintese, data, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.EszaAdatlapokMegtekinteseClick = function (e) {
|
||||
getPartialView(urls.eszaAdatlapokMegtekintese, {}, e);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.PalyazatFellebbezesClick = function (e) {
|
||||
getPartialView(urls.palyazatFellebbezes, {}, e);
|
||||
}
|
||||
|
||||
function getPartialView(url, data, e, manual) {
|
||||
if (!manual) {
|
||||
if (e && ($(".apaczaiMenuAktiv").attr("id") === $(e.sender.element).attr("id"))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$(".apaczaiMenuAktiv").removeClass("apaczaiMenuAktiv");
|
||||
AjaxHelper.DoPost(url, data, loadPartial);
|
||||
|
||||
if (e) {
|
||||
e.sender.element.addClass("apaczaiMenuAktiv");
|
||||
}
|
||||
else if (manual && manual.id) {
|
||||
$(manual.id).addClass("apaczaiMenuAktiv");
|
||||
}
|
||||
}
|
||||
|
||||
function loadPartial(result) {
|
||||
$('.apaczaiContentContainer').html(result);
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.DokumentumListazasaButtonClick = function (e) {
|
||||
showDokumentumList(e.id)
|
||||
}
|
||||
|
||||
function showDokumentumList(id) {
|
||||
if ($('#' + id).is(":hidden")) {
|
||||
$('#' + id).show();
|
||||
}
|
||||
else {
|
||||
$('#' + id).hide();
|
||||
}
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.downloadDokumentum = function (dokumentumId, fileName) {
|
||||
AjaxHelper.DownloadFile(urls.downloadDokumentum, { 'id': dokumentumId, 'fileName': fileName });
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.deleteDokumentum = function (dokumentumId) {
|
||||
AjaxHelper.DoPost(urls.deleteDokumentum, { 'dokumentumId': dokumentumId }, successDeleteDokumentum, errorDeleteDokumentum);
|
||||
}
|
||||
|
||||
successDeleteDokumentum = function (data) {
|
||||
if ($('#' + data.dokumentumId).parent().children().length == 1) {
|
||||
var parentId = $('#' + data.dokumentumId).parent().attr("id");
|
||||
$(document).find("#feltoltott" + parentId).addClass("hidden");
|
||||
}
|
||||
$('#' + data.dokumentumId).remove();
|
||||
KretaWindowHelper.successFeedBackWindow();
|
||||
}
|
||||
|
||||
errorDeleteDokumentum = function (data) {
|
||||
var uzenet;
|
||||
if (data.responseJSON.Json) {
|
||||
uzenet = data.responseJSON.Json.Uzenet + ((data.responseJSON.Json.MegjelenitendoHiba) ? ' (' + data.responseJSON.Json.MegjelenitendoHiba + ')' : '');
|
||||
}
|
||||
else if (data.responseJSON.ModelState) {
|
||||
uzenet = '@ErrorResource.SikertelenApaczaiDokumentumTorles'.slice(0, -1) + '@ErrorResource.KerjukEllenorizdAMegadottAdatokat';
|
||||
}
|
||||
else {
|
||||
uzenet = data.responseJSON.Message;
|
||||
}
|
||||
KretaWindowHelper.feedbackWindow("@ErrorResource.Hiba", uzenet, true, null, "@CommonResource.Rendben");
|
||||
}
|
||||
|
||||
tanuloApaczaiHelper.onFileUploadSelect = function (e) {
|
||||
KretaFileUpload.StopAnimation();
|
||||
var allowedFileExtensionArray = [];
|
||||
@foreach(var ext in Model.AllowedFileExtensions)
|
||||
{
|
||||
<text>allowedFileExtensionArray.push("@ext");</text>
|
||||
}
|
||||
const megaByte = 1024 * 1024;
|
||||
var attachmentMaxFileSizeInBytes = 15 * megaByte;
|
||||
var attachments = e.files;
|
||||
|
||||
for (var i = 0; i < attachments.length; i++) {
|
||||
if (attachmentMaxFileSizeInBytes < attachments[i].size) {
|
||||
e.preventDefault();
|
||||
var errorMessage = "@ErrorResource.HibaTortentXMBNalNemLehetNagyobbAFajlMerete";
|
||||
errorMessage = errorMessage.replace("{0}", attachmentMaxFileSizeInBytes / (1024 * 1024));
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", errorMessage, true);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($.inArray(attachments[i].extension.toLowerCase(), allowedFileExtensionArray) === -1) {
|
||||
e.preventDefault();
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@ErrorResource.AFajlKiterjeszteseVagyTipusaNemMegfelelo", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tanuloApaczaiHelper;
|
||||
})();
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue