init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,31 @@
|
|||
@using Kreta.Web.Helpers.Grid;
|
||||
@using Kreta.Web.Areas.Adminisztracio.Models
|
||||
|
||||
@{
|
||||
var grid = Html.KretaGrid<CsoportTipusGridModel>
|
||||
(
|
||||
name: "CsoportTipusGrid",
|
||||
getUrl: new GridApiUrl("SystemSettingsApi", "GetCsoportTipusGridList", new Dictionary<string, string> { }),
|
||||
allowFilterable: false,
|
||||
allowPaging: false,
|
||||
pageSizes: null,
|
||||
showSorszam: false
|
||||
);
|
||||
|
||||
grid.Columns(c => c.Template(t => t.ToString()).Title(SystemSettingsResource.CsoportTipusNev).ClientTemplate(
|
||||
"<span> #:Nev# </span>"
|
||||
));
|
||||
|
||||
grid.Columns(c => c.Template(t => t.ToString()).Title(SystemSettingsResource.OraPerc).ClientTemplate(
|
||||
grid.NumericBoxForColumnTemplate(Html, m => m.OraPerc, 1, 120,0)
|
||||
));
|
||||
|
||||
grid.Columns(c => c.Template(t => t.ToString()).Title(SystemSettingsResource.TanoraCelu).ClientTemplate(
|
||||
@"
|
||||
#if (IsProtected == true && IsTanoraiCelu == true) { # " + CommonResource.Igen + @"# } else if (IsProtected == true && IsTanoraiCelu == false) { # " + CommonResource.Nem
|
||||
+ @"# } else if (IsProtected == false) { # " +
|
||||
grid.CheckBoxColumnTemplate("IsTanoraiCelu", x => x.IsTanoraiCelu, true)
|
||||
+ @"# } #"
|
||||
));
|
||||
}
|
||||
@(grid)
|
|
@ -0,0 +1,344 @@
|
|||
@using Kreta.Web.Areas.Adminisztracio.Models
|
||||
|
||||
@model FejlecLablecSzerkesztoModel
|
||||
|
||||
@{
|
||||
List<SelectListItem> list = new List<SelectListItem>();
|
||||
|
||||
list.Add(new SelectListItem() { Value = "0", Text = "(kép mérete)", Selected = true });
|
||||
for (int i = 1; i <= 10; i++)
|
||||
{
|
||||
list.Add(new SelectListItem() { Value = i.ToString(), Text = i.ToString() + "0%-os képméret" });
|
||||
}
|
||||
|
||||
Layout = null;
|
||||
|
||||
var mentesUrl = Model.IsFejlec ? Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "FejlecMentes" }) : Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "LablecMentes" });
|
||||
var torlesUrl = Model.IsFejlec ? Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "FejlecTorles" }) : Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "LablecTorles" });
|
||||
var checkBoxSave = Model.IsFejlec ? Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "FejlecCheckBoxMentes" }) : Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "LablecCheckBoxMentes" });
|
||||
var fejlecVagyLablec = Model.IsFejlec ? SystemSettingsResource.Fejlec : SystemSettingsResource.Lablec;
|
||||
var fejlecVagyLablecText = Model.IsFejlec ? SystemSettingsResource.EgyeniFejlec : SystemSettingsResource.EgyeniLablec;
|
||||
var base64Image = Model.Base64Image;
|
||||
var imageValidate = Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "ImageValidate" });
|
||||
}
|
||||
|
||||
<style>
|
||||
#FejlecLablecSzerkeszto .k-widget.k-editor.k-header.k-editor-widget {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#FejlecLablecSzerkeszto .k-editable-area {
|
||||
height: 140px;
|
||||
}
|
||||
|
||||
#FejlecLablecSzerkeszto #tempHtmlContent {
|
||||
width: 980px;
|
||||
height: 140px;
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#FejlecLablecSzerkeszto #img2b64 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#FejlecLablecSzerkeszto .k-addImageTool {
|
||||
background-image: url('../../../../Content/content/images/sprite.png');
|
||||
background-position: -288px -96px;
|
||||
}
|
||||
|
||||
#inline {
|
||||
display: flex;
|
||||
height: 100px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#inline .Cim {
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#inline .Szoveg {
|
||||
text-align: center;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
#inline .CheckBox {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#iktatas {
|
||||
height: auto;
|
||||
position: relative;
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
#iktatas p {
|
||||
color: black;
|
||||
vertical-align: bottom;
|
||||
text-align: center;
|
||||
font-size: 13pt;
|
||||
}
|
||||
|
||||
#pictureDetailText {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#pictureDetailText p {
|
||||
color: black;
|
||||
margin: 10px auto;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
#FejlecLablecSzerkeszto > table {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#FejlecLablecSzerkeszto > #tempHtmlContent {
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="pictureDetailText">
|
||||
<p>@SystemSettingsResource.MaxKepmeret
|
||||
</div>
|
||||
|
||||
<div id="FejlecLablecSzerkeszto">
|
||||
@(Html.KretaHtmlEditorFor(m => m.Htmlcontent)
|
||||
.Tools(tools => tools
|
||||
.CustomButton(customButton => customButton
|
||||
.Name("addImageTool")
|
||||
.ToolTip(CommonResource.KepHozzaadas)
|
||||
.Exec(
|
||||
@<text>
|
||||
function(e) {
|
||||
$("#inputFileToLoad").click();
|
||||
}
|
||||
</text>
|
||||
)
|
||||
)
|
||||
.CustomTemplate(template => template
|
||||
.Template(Html.KretaDropdownList("ImagePercentDropDown", list)
|
||||
.Events(e => e.Select("function(e) { FejlecLablecSzerkesztoHelper.selectedPrecent(e) }"))
|
||||
.HtmlAttributes(new Dictionary<string, object>() { { "style", "margin-bottom: 0px;" } } )
|
||||
.ToClientTemplate()
|
||||
.ToHtmlString())
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
<div id="tempHtmlContent"></div>
|
||||
<form class="input-group" id="img2b64">
|
||||
<input id="inputFileToLoad" type="file" accept="image/*" onchange="FejlecLablecSzerkesztoHelper.Encode();"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="inline">
|
||||
<div class="Cim">@fejlecVagyLablec</div>
|
||||
<div class="Szoveg">@fejlecVagyLablecText</div>
|
||||
<div class="CheckBox">@Html.KretaSwitchButton("IsFejlecOrLablecMegjelenit", Model.IsFejlecOrLablecMegjelenit)</div>
|
||||
</div>
|
||||
<div id="iktatas">
|
||||
<p>@SystemSettingsResource.HaIktatniKivant
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var FejlecLablecSzerkesztoHelper = (function () {
|
||||
var fejlecLablecSzerkesztoHelper = function () { };
|
||||
|
||||
var rawBase64Image = null;
|
||||
var mentesUrl = "@mentesUrl";
|
||||
var torlesUrl = "@torlesUrl";
|
||||
var checkBoxSave = "@checkBoxSave";
|
||||
var base64Image = "@base64Image";
|
||||
var imageValidate = "@imageValidate";
|
||||
var editorValue = null;
|
||||
var generatedCanvas = null;
|
||||
var isHtmlContetChange = false;
|
||||
var isOkButtonShow = false;
|
||||
|
||||
fejlecLablecSzerkesztoHelper.Generalas = function () { generate(); };
|
||||
fejlecLablecSzerkesztoHelper.Mentes = function () { save(); };
|
||||
fejlecLablecSzerkesztoHelper.Torles = function () { confirmTorles(); };
|
||||
fejlecLablecSzerkesztoHelper.Cancel = function () { cancel(); };
|
||||
fejlecLablecSzerkesztoHelper.Encode = function (cb) { encodeImageFile(cb); };
|
||||
fejlecLablecSzerkesztoHelper.init = function () {
|
||||
editorValue = $("#Htmlcontent").data("kendoEditor").value();
|
||||
var editor = $("#Htmlcontent").data("kendoEditor");
|
||||
var fontNames = [].concat(kendo.ui.Editor.fn.options.fontName,
|
||||
[{ text: "Baar Sophia", value: "Baar Sophia" }]);
|
||||
fontNames.sort(function (a, b) {
|
||||
var textA = a.text.toUpperCase();
|
||||
var textB = b.text.toUpperCase();
|
||||
if (textA < textB) {
|
||||
return -1;
|
||||
}
|
||||
if (textA > textB) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
editor.options.fontName = fontNames;
|
||||
editor.setOptions(editor.options);
|
||||
$(editor.body).prevAll("head").append("<link href='/Content/editor-fonts.css' rel='stylesheet' type='text/css'>")
|
||||
$(editor.body).css('overflow','hidden')
|
||||
}
|
||||
|
||||
fejlecLablecSzerkesztoHelper.selectedPrecent = function (e) {
|
||||
|
||||
var editor = $("#Htmlcontent").data("kendoEditor");
|
||||
var percent = $("#ImagePercentDropDown").data("kendoDropDownList").dataItem(e.item).Value
|
||||
|
||||
if (!CommonUtils.isNullOrWhiteSpace(rawBase64Image) && percent > 0 && percent <= 9) {
|
||||
var percentValue = parseFloat("0." + percent)
|
||||
|
||||
var img = new Image();
|
||||
img.src = rawBase64Image;
|
||||
var width = img.width * percentValue;
|
||||
var height = img.height * percentValue;
|
||||
|
||||
var canvas = document.createElement('canvas');
|
||||
canvas.width = width;
|
||||
canvas.height = height;
|
||||
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.drawImage(img, 0, 0, width, height);
|
||||
|
||||
var result = canvas.toDataURL();
|
||||
|
||||
var editorContent = editor.value();
|
||||
|
||||
var inserthtml = '<img src="' + result + '" />';
|
||||
|
||||
editor.value(`${editorContent.replace(/(<img([^>]+)>)/gi, inserthtml)}`);
|
||||
|
||||
img = null;
|
||||
} else if (!CommonUtils.isNullOrWhiteSpace(rawBase64Image) && percent == 10) {
|
||||
var editorContent = editor.value();
|
||||
|
||||
var inserthtml = '<img src="' + rawBase64Image + '" />';
|
||||
|
||||
editor.value(`${editorContent.replace(/(<img([^>]+)>)/gi, inserthtml)}`);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function generate() {
|
||||
var content = $("#Htmlcontent").data("kendoEditor").value();
|
||||
AjaxHelper.DoPost(imageValidate, content, function () {
|
||||
var temp = $("#tempHtmlContent");
|
||||
temp.empty();
|
||||
temp.append(content);
|
||||
generatedCanvas = content;
|
||||
showElonezetButton();
|
||||
showOkButton();
|
||||
showDelButton();
|
||||
});
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
if (isHtmlContetChange === true) {
|
||||
KretaWindowHelper.confirmWindow("@(SystemSettingsResource.BiztosanFolytat)", "@(SystemSettingsResource.ElNemMentettModositas)", KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
else {
|
||||
KretaWindowHelper.destroyAllWindow();
|
||||
}
|
||||
}
|
||||
|
||||
function save() {
|
||||
if (generatedCanvas !== null && editorValue !== "") {
|
||||
var model = {
|
||||
IsFejlecOrLablecMegjelenit: $("#hiddenIsFejlecOrLablecMegjelenit").val(),
|
||||
Htmlcontent: $("#Htmlcontent").data("kendoEditor").value()
|
||||
};
|
||||
|
||||
AjaxHelper.DoPost(mentesUrl, model, KretaWindowHelper.destroyAllWindow);
|
||||
KretaWindowHelper.successFeedBackWindow();
|
||||
}
|
||||
else {
|
||||
var postData = {};
|
||||
if(editorValue === ""){
|
||||
postData.isMegjelenit = false;
|
||||
}
|
||||
else {
|
||||
postData.isMegjelenit = $("#hiddenIsFejlecOrLablecMegjelenit").val();
|
||||
|
||||
}
|
||||
|
||||
AjaxHelper.DoPostQuery(checkBoxSave, null, postData, KretaWindowHelper.destroyAllWindow);
|
||||
KretaWindowHelper.successFeedBackWindow();
|
||||
}
|
||||
}
|
||||
|
||||
function confirmTorles() {
|
||||
KretaWindowHelper.confirmWindow("@(SystemSettingsResource.Torles)", "@(SystemSettingsResource.VeglegesenTorol)", torles);
|
||||
}
|
||||
|
||||
function torles() {
|
||||
AjaxHelper.DoPost(torlesUrl, null, callbackTorles);
|
||||
}
|
||||
|
||||
function callbackTorles() {
|
||||
KretaWindowHelper.successFeedBackWindow();
|
||||
|
||||
var editor = $("#Htmlcontent").data("kendoEditor");
|
||||
editor.value('');
|
||||
editor.refresh();
|
||||
editorValue = editor.value();
|
||||
|
||||
KretaWindowHelper.destroyAllWindow();
|
||||
}
|
||||
|
||||
function encodeImageFile(cb) {
|
||||
return function () {
|
||||
var file = this.files[0];
|
||||
var reader = new FileReader();
|
||||
reader.onloadend = function () {
|
||||
cb(reader.result);
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
|
||||
function editorChange() {
|
||||
editorValue = $("#Htmlcontent").data("kendoEditor").value();
|
||||
if (isHtmlContetChange === true && isOkButtonShow === true) {
|
||||
hideOkButton();
|
||||
}
|
||||
}
|
||||
|
||||
$('#inputFileToLoad').change(encodeImageFile(function (base64Img) {
|
||||
var editor = $("#Htmlcontent").data("kendoEditor");
|
||||
editor.exec("inserthtml", { value: '<img src="' + base64Img + '" />' });
|
||||
rawBase64Image = base64Img;
|
||||
}));
|
||||
|
||||
$("#myIsFejlecOrLablecMegjelenit").change(showOkButton);
|
||||
$("#Htmlcontent").data("kendoEditor").bind("change", function () { isHtmlContetChange = true; editorChange(); showElonezetButton();});
|
||||
|
||||
function hideOkButton() { $("#BtnOk").hide(); }
|
||||
function showOkButton() { if (isHtmlContetChange === true && generatedCanvas !== null || isHtmlContetChange === false) $("#BtnOk").show(); isOkButtonShow = true; }
|
||||
function hideDelButton() { $("#BtnDelete").hide(); }
|
||||
function showDelButton() { $("#BtnDelete").show(); }
|
||||
function hideElonezetButton() { $("#generate").hide(); }
|
||||
function showElonezetButton() { $("#generate").show(); }
|
||||
|
||||
hideElonezetButton();
|
||||
hideOkButton();
|
||||
if (base64Image !== "") {
|
||||
showDelButton();
|
||||
} else {
|
||||
hideDelButton();
|
||||
}
|
||||
return fejlecLablecSzerkesztoHelper;
|
||||
})();
|
||||
|
||||
$(document).ready(function () {
|
||||
FejlecLablecSzerkesztoHelper.init();
|
||||
});
|
||||
|
||||
</script>
|
663
KretaWeb/Areas/Adminisztracio/Views/SystemSettings/Index.cshtml
Normal file
663
KretaWeb/Areas/Adminisztracio/Views/SystemSettings/Index.cshtml
Normal file
|
@ -0,0 +1,663 @@
|
|||
@using Kreta.Web.Security
|
||||
@using Kreta.Framework;
|
||||
@using Kreta.Web.Areas.Adminisztracio.Controllers
|
||||
@using Kreta.Web.Areas.Adminisztracio.Models;
|
||||
|
||||
@model SystemSettingsModel
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/_MasterLayout.cshtml";
|
||||
}
|
||||
|
||||
@Scripts.Render("~/bundles/KretaSwitchButtonHelper")
|
||||
|
||||
<script type="text/javascript">
|
||||
var SettingsHelper = (function() {
|
||||
|
||||
var settingsHelper = function() {};
|
||||
|
||||
var url = {
|
||||
SaveSettingsUrl: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "SaveSystemSettings"})",
|
||||
OpenCsoportTipusListUrl: "@Url.Action("OpenCsoportTipusListWindow", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
OpenGradeWeightUrl: "@Url.Action("OpenGradeWeightWindow", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
OpenFejlecSzerkesztoUrl: "@Url.Action("FejlecSzerkesztoPopUp", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
OpenLablecSzerkesztoUrl: "@Url.Action("LablecSzerkesztoPopUp", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
SaveCsoportTipusListUrl: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "SaveCsoportTipusList" })",
|
||||
SaveGradeWeightsUrl: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "SaveGradeWeights"})",
|
||||
ResetSettingsUrl: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "ResetSystemSettings"})",
|
||||
ReloadPageUrl: "@Url.Action("Index", "SystemSettings")",
|
||||
DeleteTantargyfelosztas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "DeleteTantargyfelosztas" })",
|
||||
DeleteImportaltTantargyfelosztas: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "DeleteImportaltTantargyfelosztas" })",
|
||||
DeleteOrarendek: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "DeleteOrarendek" })",
|
||||
JuttatasAdatokUjraGeneralasa: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "JuttatasAdatokUjraGeneralasa" })",
|
||||
//FeleviAtlagokUjraGeneralasa: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "FeleviAtlagokUjraGeneralasa" })",
|
||||
//EvvegiAtlagokUjraGeneralasa: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "EvvegiAtlagokUjraGeneralasa" })",
|
||||
};
|
||||
|
||||
settingsHelper.SaveSettings = function() {
|
||||
if (window.isSzakmaiGyakDatumIsChanged) {
|
||||
SettingsHelper.ConfirmSave();
|
||||
}
|
||||
else {
|
||||
SettingsHelper.PostSave();
|
||||
}
|
||||
};
|
||||
|
||||
settingsHelper.ConfirmSave = function() {
|
||||
KretaWindowHelper.confirmWindow("@(RendszerErtesitesResource.Kerdes)", "@(RendszerErtesitesResource.SzakmaiGyakorlatValtozottKerdes)", SettingsHelper.PostSave);
|
||||
};
|
||||
|
||||
settingsHelper.PostSave = function() {
|
||||
AjaxHelper.DoPostElement(url.SaveSettingsUrl, "SettingsForm", successSave, failedSave);
|
||||
};
|
||||
|
||||
settingsHelper.OpenPanelBar = function() {
|
||||
var panelBar = $('#SpecialisBeallitasokPanel').data('kendoPanelBar');
|
||||
panelBar.expand($('#SpecialisBeallitasokPanel li:first-child'), false);
|
||||
|
||||
var panelBar = $('#SystemSettingsPanel').data('kendoPanelBar');
|
||||
panelBar.expand($('#SystemSettingsPanel .k-item'), false);
|
||||
};
|
||||
|
||||
settingsHelper.ClosePanelBar = function() {
|
||||
var panelBar = $('#SpecialisBeallitasokPanel').data('kendoPanelBar');
|
||||
panelBar.collapse($('#SpecialisBeallitasokPanel li:first-child'));
|
||||
|
||||
var panelBar = $('#SystemSettingsPanel').data('kendoPanelBar');
|
||||
panelBar.collapse($('#SystemSettingsPanel .k-item'));
|
||||
};
|
||||
|
||||
settingsHelper.ResetSettings = function() {
|
||||
KretaWindowHelper.confirmWindow("@(RendszerErtesitesResource.Kerdes)", "@(RendszerErtesitesResource.BiztosanAlapHelyzetbeAllit)", resetSettings);
|
||||
};
|
||||
|
||||
settingsHelper.openCsoportTipusListWindow = function () {
|
||||
AjaxHelper.DoGet(url.OpenCsoportTipusListUrl, {}, popupCsoportTipusList, undefined);
|
||||
};
|
||||
|
||||
settingsHelper.openGradeWeightWindow = function () {
|
||||
AjaxHelper.DoGet(url.OpenGradeWeightUrl, {}, popupGradeWeightsSettings, undefined);
|
||||
};
|
||||
|
||||
settingsHelper.openFejlecSzerkesztoWindow = function() {
|
||||
AjaxHelper.DoGet(url.OpenFejlecSzerkesztoUrl, {}, function(data) { popUpFejlecLablecSzerkeszto(data, "@AdminisztracioResource.FejlecSzerkeszto") });
|
||||
};
|
||||
|
||||
settingsHelper.openLablecSzerkesztoWindow = function() {
|
||||
AjaxHelper.DoGet(url.OpenLablecSzerkesztoUrl, {}, function(data) { popUpFejlecLablecSzerkeszto(data, "@AdminisztracioResource.LablecSzerkeszto") });
|
||||
};
|
||||
|
||||
settingsHelper.csoportTipusListWindowClose = function () {
|
||||
KretaWindowHelper.destroyWindow("CsoportTipusListWindow");
|
||||
};
|
||||
|
||||
settingsHelper.gradeWeightsWindowClose = function() {
|
||||
KretaWindowHelper.destroyWindow("GradeWeightsSettingsWindow");
|
||||
};
|
||||
|
||||
settingsHelper.saveCsoportTipusList = function () {
|
||||
var errorMsg = ""; var csoportTipusList = [];
|
||||
|
||||
$.each(KretaGridHelper.getAllRows("CsoportTipusGrid"), function (key, value) {
|
||||
if (value.ki_OraPerc == "") { errorMsg += value.Nev + " esetén az óraperc nem lehet üres!<br />" }
|
||||
if (!value.IsProtected) {
|
||||
csoportTipusList.push({ Id: value.ID, IsTanoraiCelu: value.ki_IsTanoraiCelu, OraPerc: value.ki_OraPerc });
|
||||
}
|
||||
else {
|
||||
csoportTipusList.push({ Id: value.ID, IsTanoraiCelu: value.IsTanoraiCelu, OraPerc: value.ki_OraPerc });
|
||||
}
|
||||
});
|
||||
|
||||
if (errorMsg != "") {
|
||||
KretaWindowHelper.notification(errorMsg, "error");
|
||||
} else {
|
||||
AjaxHelper.DoPost(url.SaveCsoportTipusListUrl, csoportTipusList, successSave, failedSave);
|
||||
}
|
||||
};
|
||||
|
||||
settingsHelper.saveGradeWeights = function() {
|
||||
AjaxHelper.DoPostElement(url.SaveGradeWeightsUrl, "GradeWeightsForm", successSave, failedSave);
|
||||
};
|
||||
|
||||
settingsHelper.toggleRendszerszintuTorlesiLehetosegekContainerButtonClick = function() {
|
||||
if (CommonUtils.parseBool("@ClaimData.IsDefaultAdminUser")) {
|
||||
$(".rendszerszintuTorlesiLehetosegekContainer").toggle();
|
||||
}
|
||||
};
|
||||
|
||||
settingsHelper.toggleJuttatasBeallitasokContainerButtonClick = function() {
|
||||
if (CommonUtils.parseBool("@Model.IsIntezmenySzakkepzoJuttatas")) {
|
||||
$(".juttatasBeallitasokContainer").toggle();
|
||||
}
|
||||
};
|
||||
|
||||
settingsHelper.deleteTantargyfelosztasConfirm = function() {
|
||||
KretaWindowHelper.confirmWindow("@CommonResource.Kerdes", "@SystemSettingsResource.TantargyFelosztasTeljesTorleseConfirmText", deleteTantargyfelosztasSecondConfirm, undefined, undefined, undefined, undefined, true);
|
||||
};
|
||||
|
||||
settingsHelper.juttatasAdatokMindenTanuloraConfirm = function () {
|
||||
KretaWindowHelper.confirmWindow("@CommonResource.Kerdes", "@SystemSettingsResource.JuttatasAdatokFrissiteseConfirmText", juttatasAdatokFrissitese);
|
||||
}
|
||||
|
||||
//settingsHelper.feleviAtlagokMindenTanuloraConfirm = function () {
|
||||
// KretaWindowHelper.confirmWindow("@CommonResource.Kerdes", "@SystemSettingsResource.FeleviAtlagokFrissiteseConfirmText", feleviAtlagokFrissitese);
|
||||
//}
|
||||
|
||||
//settingsHelper.evvegiAtlagokMindenTanuloraConfirm = function () {
|
||||
// KretaWindowHelper.confirmWindow("@CommonResource.Kerdes", "@SystemSettingsResource.EvvegiAtlagokFrissiteseConfirmText", evvegiAtlagokFrissitese);
|
||||
//}
|
||||
|
||||
function deleteTantargyfelosztasSecondConfirm() {
|
||||
KretaWindowHelper.confirmWindow("@SystemSettingsResource.TantargyFelosztasTeljesTorleseConfirmHeader", "@SystemSettingsResource.TantargyFelosztasTeljesTorleseSecondConfirmText", deleteTantargyfelosztas);
|
||||
}
|
||||
|
||||
function deleteTantargyfelosztas() {
|
||||
AjaxHelper.DoPost(url.DeleteTantargyfelosztas, {}, deleteResponseOk);
|
||||
}
|
||||
|
||||
function juttatasAdatokFrissitese() {
|
||||
AjaxHelper.DoPost(url.JuttatasAdatokUjraGeneralasa, {}, juttatasAdatokUjraGeneralasaResponseOk);
|
||||
}
|
||||
|
||||
//function feleviAtlagokFrissitese() {
|
||||
// AjaxHelper.DoPost(url.FeleviAtlagokUjraGeneralasa, {}, feleviAtlagokUjraGeneralasaResponseOk);
|
||||
//}
|
||||
|
||||
//function evvegiAtlagokFrissitese() {
|
||||
// AjaxHelper.DoPost(url.EvvegiAtlagokUjraGeneralasa, {}, evvegiAtlagokUjraGeneralasaResponseOk);
|
||||
//}
|
||||
|
||||
settingsHelper.deleteImportaltTantargyfelosztasConfirm = function() {
|
||||
KretaWindowHelper.confirmWindow("@CommonResource.Kerdes", "@SystemSettingsResource.TantargyFelosztasImportaltTorleseConfirmText", deleteImportaltTantargyfelosztasSecondConfirm, undefined, undefined, undefined, undefined, true);
|
||||
};
|
||||
|
||||
function deleteImportaltTantargyfelosztasSecondConfirm() {
|
||||
KretaWindowHelper.confirmWindow("@SystemSettingsResource.TantargyFelosztasImportaltTorleseConfirmHeader", "@SystemSettingsResource.TantargyFelosztasImportaltTorleseSecondConfirmText", deleteImportaltTantargyfelosztas);
|
||||
}
|
||||
|
||||
function deleteImportaltTantargyfelosztas() {
|
||||
AjaxHelper.DoPost(url.DeleteImportaltTantargyfelosztas, {}, deleteResponseOk);
|
||||
}
|
||||
|
||||
settingsHelper.deleteOrarendekConfirm = function() {
|
||||
KretaWindowHelper.confirmWindow("@CommonResource.Kerdes", "@SystemSettingsResource.OrarendekTeljesTorleseConfirmText", deleteOrarendekSecondConfirm, undefined, undefined, undefined, undefined, true);
|
||||
};
|
||||
|
||||
function deleteOrarendekSecondConfirm() {
|
||||
KretaWindowHelper.confirmWindow("@SystemSettingsResource.OrarendekTeljesTorleseSecondConfirmHeader", "@SystemSettingsResource.OrarendekTeljesTorleseSecondConfirmText", deleteOrarendek);
|
||||
}
|
||||
|
||||
function deleteOrarendek() {
|
||||
AjaxHelper.DoPost(url.DeleteOrarendek, {}, deleteResponseOk);
|
||||
}
|
||||
|
||||
function deleteResponseOk() {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Siker)", "@(CommonResource.ATorlesSikeresenMegtortent)", false, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function juttatasAdatokUjraGeneralasaResponseOk() {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Siker)", "@(SystemSettingsResource.JuttatasAdatokFrissiteseSikeresenMegtortent)", false, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function feleviAtlagokUjraGeneralasaResponseOk() {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Siker)", "@(SystemSettingsResource.FeleviAtlagokFrissiteseSikeresenMegtortent)", false, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function evvegiAtlagokUjraGeneralasaResponseOk() {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Siker)", "@(SystemSettingsResource.EvvegiAtlagokFrissiteseSikeresenMegtortent)", false, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function resetSettings() {
|
||||
AjaxHelper.DoPost(url.ResetSettingsUrl, null, successReset, failedReset);
|
||||
}
|
||||
|
||||
function popupCsoportTipusList(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@SystemSettingsResource.TanoraiCeluCsoportokBeallitasa";
|
||||
config.content = data;
|
||||
config.width = 800;
|
||||
config.height = 700;
|
||||
var modal = KretaWindowHelper.createWindow("CsoportTipusListWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
function popupGradeWeightsSettings(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@StringResourcesUtil.GetString(4471)";
|
||||
config.content = data;
|
||||
config.width = 600;
|
||||
config.height = 700;
|
||||
var modal = KretaWindowHelper.createWindow("GradeWeightsSettingsWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
function popUpFejlecLablecSzerkeszto(data, title) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = title;
|
||||
config.content = data;
|
||||
config.height = 700;
|
||||
config.width = 1000;
|
||||
var modal = KretaWindowHelper.createWindow("FejlecLablecSzerkesztoWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
function successSave() {
|
||||
KretaWindowHelper.successFeedBackWindow(KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function failedSave() {
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@(StringResourcesUtil.GetString(3386))" /*Beállítások mentése nem sikerült!*/, true, KretaWindowHelper.destroyAllWindow);
|
||||
}
|
||||
|
||||
function successReset() {
|
||||
KretaWindowHelper.successFeedBackWindow(reloadPage, "@(StringResourcesUtil.GetString(3388))");
|
||||
}
|
||||
|
||||
function reloadPage() {
|
||||
window.location = url.ReloadPageUrl;
|
||||
}
|
||||
|
||||
function failedReset() {
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@(StringResourcesUtil.GetString(3389))" /*Alapértékek visszaállítása sikertelen!*/, true);
|
||||
}
|
||||
|
||||
return settingsHelper;
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var TanuloErtekelesMondatbankHelper = (function () {
|
||||
|
||||
var tanuloErtekelesMondatbankHelper = function () { };
|
||||
|
||||
var popupName = "@SystemSettingsController.TanuloErtekelesMondatbankPopupName";
|
||||
var gridName = "@SystemSettingsController.TanuloErtekelesMondatbankGridName";
|
||||
|
||||
var editFormName = "@SystemSettingsController.TanuloErtekelesMondatbankItemEditFormName";
|
||||
var editPopupName = "@SystemSettingsController.TanuloErtekelesMondatbankItemEditPopupName";
|
||||
|
||||
var url = {
|
||||
OpenTanuloErtekelesMondatbankPopup: "@Url.Action("OpenTanuloErtekelesMondatbankPopup", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
OpenTanuloErtekelesMondatbankItemEditPopup: "@Url.Action("OpenTanuloErtekelesMondatbankItemEditPopup", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
SaveTanuloErtekelesMondatbankItem: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "SaveTanuloErtekelesMondatbankItem" })",
|
||||
DeleteTanuloErtekelesMondatbankItem: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "DeleteTanuloErtekelesMondatbankItem" })",
|
||||
DeleteSelectedTanuloErtekelesMondatbankItems: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "SystemSettingsApi", action = "DeleteSelectedTanuloErtekelesMondatbankItems" })",
|
||||
OpenTobbesModTanuloErtekelesMondatbankPopUp: "@Url.Action("OpenTobbesModTanuloErtekelesMondatbankPopUp", "SystemSettings", new {area = "Adminisztracio"})",
|
||||
SaveSelectedTanuloErtekelesMondatbankItems: "@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = "SystemSettingsApi", action = "SaveSelectedTanuloErtekelesMondatbankItems"})"
|
||||
};
|
||||
|
||||
tanuloErtekelesMondatbankHelper.openTanuloErtekelesMondatbankPopup = function () {
|
||||
AjaxHelper.DoGet(url.OpenTanuloErtekelesMondatbankPopup, {}, popUpTanuloErtekelesMondatbank);
|
||||
};
|
||||
|
||||
function popUpTanuloErtekelesMondatbank(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@TanuloErtekelesResource.TanuloErtekelesMondatbank";
|
||||
config.width = "1366px";
|
||||
config.height = "768px";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow(popupName, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
tanuloErtekelesMondatbankHelper.tanuloErtekelesMondatbankPopupCancel = function () {
|
||||
KretaWindowHelper.destroyWindow(popupName);
|
||||
};
|
||||
|
||||
tanuloErtekelesMondatbankHelper.openNewTanuloErtekelesMondatbankItemPopup = function () {
|
||||
var postData = { "id": null };
|
||||
AjaxHelper.DoPost(url.OpenTanuloErtekelesMondatbankItemEditPopup, postData, popUpTanuloErtekelesMondatbankItemEditWindow);
|
||||
};
|
||||
|
||||
tanuloErtekelesMondatbankHelper.openModifyTanuloErtekelesMondatbankItemPopup = function (data) {
|
||||
var postData = { "id": data.ID };
|
||||
AjaxHelper.DoPost(url.OpenTanuloErtekelesMondatbankItemEditPopup, postData, popUpTanuloErtekelesMondatbankItemEditWindow);
|
||||
};
|
||||
|
||||
tanuloErtekelesMondatbankHelper.deleteSelectedTanuloErtekelesMondatbankItems = function () {
|
||||
var selectedRows = KretaGridHelper.getSelectedRowsByGridName(gridName);
|
||||
if (selectedRows.length > 0) {
|
||||
KretaWindowHelper.confirmWindow("@(CommonResource.Figyelmeztetes)", "@(CommonResource.BiztosanTorolniSzeretneAKijeloltElemeket)", function () { deleteSelectedTanuloErtekelesMondatbankItems(selectedRows); });
|
||||
}
|
||||
else {
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Figyelmeztetes)", "@(SystemSettingsResource.AKijeloltElemekTorlesehezJeloljonKiLegalabbEgyElemet)", true);
|
||||
}
|
||||
}
|
||||
|
||||
tanuloErtekelesMondatbankHelper.modifySelectedTanuloErtekelesMondatbankItems = function () {
|
||||
var selectedRows = KretaGridHelper.getSelectedRowsByGridName(gridName);
|
||||
if (selectedRows.length == 0) {
|
||||
KretaWindowHelper.warningWindow("@(CommonResource.Kivalasztas)", "@(SystemSettingsResource.ACsoportosModositashozLegalabbEgyElemKivalasztasaSzukseges)");
|
||||
}
|
||||
else if (selectedRows.length == 1) {
|
||||
var postData = { "id": selectedRows[0].ID };
|
||||
AjaxHelper.DoPost(url.OpenTanuloErtekelesMondatbankItemEditPopup, postData, popUpTanuloErtekelesMondatbankItemEditWindow);
|
||||
}
|
||||
else {
|
||||
var parameters = [];
|
||||
$.each(selectedRows, function (index, value) {
|
||||
parameters.push(value.ID);
|
||||
});
|
||||
|
||||
AjaxHelper.DoPost(url.OpenTobbesModTanuloErtekelesMondatbankPopUp, parameters, OpenTobbesModTanuloErtekelesMondatbankPopUp);
|
||||
}
|
||||
}
|
||||
|
||||
function popUpTanuloErtekelesMondatbankItemEditWindow(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@TanuloErtekelesResource.TanuloErtekelesMondatbank";
|
||||
config.width = "960px";
|
||||
config.height = "550px";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow(editPopupName, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
tanuloErtekelesMondatbankHelper.tanuloErtekelesMondatbankItemEditPopupCancel = function () {
|
||||
destroyEditPopup();
|
||||
};
|
||||
|
||||
tanuloErtekelesMondatbankHelper.tanuloErtekelesMondatbankItemEditPopupSave = function () {
|
||||
var form = $('#' + editFormName);
|
||||
|
||||
if (form.valid()) {
|
||||
var data = form.toObject();
|
||||
AjaxHelper.DoValidationPost(url.SaveTanuloErtekelesMondatbankItem, editFormName, data, saveResponseOk);
|
||||
}
|
||||
}
|
||||
|
||||
tanuloErtekelesMondatbankHelper.tanuloErtekelesMondatbankItemEditPopupDelete = function () {
|
||||
var formData = $("#" + editFormName).toObject();
|
||||
KretaWindowHelper.confirmWindow(
|
||||
"@(CommonResource.Kerdes)",
|
||||
"@(CommonResource.BiztosanTorli)",
|
||||
deleteTanuloErtekelesMondatbankItem,
|
||||
formData.ID
|
||||
);
|
||||
}
|
||||
|
||||
tanuloErtekelesMondatbankHelper.deleteTanuloErtekelesMondatbankItemConfirmWindow = function (rowData) {
|
||||
KretaWindowHelper.confirmWindow(
|
||||
"@(CommonResource.Kerdes)",
|
||||
"@(CommonResource.BiztosanTorli)",
|
||||
deleteTanuloErtekelesMondatbankItem,
|
||||
rowData.ID
|
||||
);
|
||||
}
|
||||
|
||||
tanuloErtekelesMondatbankHelper.tanuloErtekelesMondatbankItemTobbesEditPopupSave = function (data) {
|
||||
KretaWindowHelper.confirmWindow(
|
||||
"@(CommonResource.Kerdes)",
|
||||
"@(CommonResource.BiztosanModositaniSzeretneAKijeloltElemeket)",
|
||||
saveSelectedTanuloErtekelesMondatbankItems,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
||||
function deleteTanuloErtekelesMondatbankItem(data) {
|
||||
AjaxHelper.DoValidationPost(
|
||||
url.DeleteTanuloErtekelesMondatbankItem,
|
||||
null,
|
||||
data,
|
||||
deleteTanuloErtekelesMondatbankItemResponseOk,
|
||||
feedbackErrorWithMessage
|
||||
);
|
||||
}
|
||||
|
||||
function deleteTanuloErtekelesMondatbankItemResponseOk() {
|
||||
KretaWindowHelper.successFeedBackWindow(destroyEditPopup);
|
||||
refreshGrid();
|
||||
}
|
||||
|
||||
function saveResponseOk() {
|
||||
KretaWindowHelper.successFeedBackWindow(destroyEditPopup);
|
||||
refreshGrid();
|
||||
}
|
||||
|
||||
function feedbackErrorWithMessage(data) {
|
||||
var messageJson = CommonUtils.JSONparse(data.responseText);
|
||||
KretaWindowHelper.feedbackWindow("@(CommonResource.Hiba)", messageJson.Message, true);
|
||||
}
|
||||
|
||||
function destroyEditPopup() {
|
||||
KretaWindowHelper.destroyWindow(editPopupName);
|
||||
}
|
||||
|
||||
function refreshGrid() {
|
||||
$('#' + gridName + '_chk').attr('checked', false);
|
||||
KretaGridHelper.refreshGrid(gridName);
|
||||
}
|
||||
|
||||
function deleteSelectedTanuloErtekelesMondatbankItems(selectedRows) {
|
||||
var parameters = [];
|
||||
$.each(selectedRows, function (index, value) {
|
||||
parameters.push(value.ID);
|
||||
});
|
||||
|
||||
AjaxHelper.DoPost(url.DeleteSelectedTanuloErtekelesMondatbankItems, parameters, deleteSelectedTanuloErtekelesMondatbankItemResponseOk, deleteSelectedTanuloErtekelesMondatbankItemResponseError);
|
||||
}
|
||||
|
||||
function deleteSelectedTanuloErtekelesMondatbankItemResponseError(data) {
|
||||
refreshGrid();
|
||||
AjaxHelper.ShowError(data);
|
||||
}
|
||||
|
||||
function deleteSelectedTanuloErtekelesMondatbankItemResponseOk(data) {
|
||||
KretaWindowHelper.successFeedBackWindow(null, data.Message);
|
||||
refreshGrid();
|
||||
}
|
||||
|
||||
function OpenTobbesModTanuloErtekelesMondatbankPopUp(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@TanuloErtekelesResource.TanuloErtekelesMondatbank";
|
||||
config.width = "960px";
|
||||
config.height = "400px";
|
||||
config.content = data;
|
||||
|
||||
var modal = KretaWindowHelper.createWindow(editPopupName, config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
function saveSelectedTanuloErtekelesMondatbankItems(data) {
|
||||
AjaxHelper.DoPost(url.SaveSelectedTanuloErtekelesMondatbankItems, $('#' + editFormName).toObject(), function (data) {
|
||||
KretaWindowHelper.successFeedBackWindow(destroyEditPopup, data.Message);
|
||||
refreshGrid();
|
||||
}, function (error) {
|
||||
AjaxHelper.ShowError(error);
|
||||
});
|
||||
}
|
||||
|
||||
return tanuloErtekelesMondatbankHelper;
|
||||
})();
|
||||
</script>
|
||||
|
||||
@using (Html.KretaForm("SettingsForm"))
|
||||
{
|
||||
<div class="buttonContainer">
|
||||
<div class="toLeft BtnOk">
|
||||
@Html.KretaSaveButton("saveSettingsHeader", "SettingsHelper.SaveSettings")
|
||||
</div>
|
||||
<div class="toLeft">
|
||||
@Html.KretaButton("resetSettingsHeader", SystemSettingsResource.AlapbeallitasokVisszallitasa, clickEventName: "SettingsHelper.ResetSettings")
|
||||
</div>
|
||||
<div class="toRight">
|
||||
@Html.KretaButton("openPanelBar", SystemSettingsResource.OsszesPanelKinyitasa, clickEventName: "SettingsHelper.OpenPanelBar")
|
||||
</div>
|
||||
<div class="toRight">
|
||||
@Html.KretaButton("closePanelBar", SystemSettingsResource.OsszesPanelBezarasa, clickEventName: "SettingsHelper.ClosePanelBar")
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
@Html.KretaValidationSummary()
|
||||
</div>
|
||||
<div>
|
||||
@Html.Partial("EditorTemplates/PanelBar", Model.SpecialisBeallitasokModel)
|
||||
</div>
|
||||
<div>
|
||||
@Html.Partial("EditorTemplates/PanelBar", Model)
|
||||
</div>
|
||||
<div class="buttonContainer">
|
||||
<div class="toLeft BtnOk">
|
||||
@Html.KretaSaveButton("saveSettings", "SettingsHelper.SaveSettings")
|
||||
</div>
|
||||
<div class="toLeft">
|
||||
@Html.KretaButton("resetSettings", SystemSettingsResource.AlapbeallitasokVisszallitasa, clickEventName: "SettingsHelper.ResetSettings")
|
||||
</div>
|
||||
@if (ClaimData.IsDefaultAdminUser)
|
||||
{
|
||||
<text>
|
||||
<div class="toRight BtnDelete">
|
||||
@Html.KretaButton("toggleRendszerszintuTorlesiLehetosegekContainer", SystemSettingsResource.RendszerszintuTorlesiLehetosegek, clickEventName: "SettingsHelper.toggleRendszerszintuTorlesiLehetosegekContainerButtonClick")
|
||||
</div>
|
||||
</text>
|
||||
}
|
||||
@if (Model.IsIntezmenySzakkepzoJuttatas)
|
||||
{
|
||||
<text>
|
||||
<div class="toRight BtnOk">
|
||||
@Html.KretaButton("juttatasBeallitasok", SystemSettingsResource.JuttatasBeallitasok, clickEventName: "SettingsHelper.toggleJuttatasBeallitasokContainerButtonClick")
|
||||
</div>
|
||||
</text>
|
||||
}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
if (Model.IsIntezmenySzakkepzoJuttatas)
|
||||
{
|
||||
<text>
|
||||
<div class="juttatasBeallitasokContainer">
|
||||
@Html.Partial("EditorTemplates/PanelBar", Model.JuttatasBeallitasokModel)
|
||||
</div>
|
||||
</text>
|
||||
}
|
||||
<div class="rendszerszintuTorlesiLehetosegekContainer">
|
||||
@Html.Partial("EditorTemplates/PanelBar", Model.RendszerszintuTorlesiLehetosegekModel)
|
||||
</div>
|
||||
<div>
|
||||
@Html.KretaValidationSummary()
|
||||
</div>
|
||||
}
|
||||
|
||||
<style type="text/css">
|
||||
.buttonContainer {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.buttonContainer div {
|
||||
margin-right: 0.16em;
|
||||
}
|
||||
|
||||
.buttonContainer div.toLeft {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.buttonContainer div.toRight {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.buttonContainer div.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#RendszerszintuTorlesPanel > li > a {
|
||||
color: #a94442;
|
||||
}
|
||||
|
||||
#RendszerszintuTorlesPanel .rendszerszintuTorles > button.k-button {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#JuttatasBeallitasokPanel > li > a {
|
||||
/* color: #a94442;*/
|
||||
}
|
||||
|
||||
#JuttatasBeallitasokPanel .juttatasBeallitas > button.k-button {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.rendszerszintuTorlesiLehetosegekContainer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.juttatasBeallitasokContainer {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#myOsztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_zaradekat").change(function () {
|
||||
var zaradekChecked = $(this).val();
|
||||
var tanuloadatmodositasChecked = $("#myOsztalyfonok_modosithatja_osztalyaba_jaro_tanulok_adatait").val();
|
||||
var atsorolasiElem = $("#myOsztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat");
|
||||
if (zaradekChecked == "false") {
|
||||
if (atsorolasiElem.is(":checked")) {
|
||||
atsorolasiElem.prop("checked", true);
|
||||
SwitchButtonHelper.switchButtonChange("myOsztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat",
|
||||
"hiddenOsztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat");
|
||||
}
|
||||
atsorolasiElem.parent().prop("disabled", true);
|
||||
atsorolasiElem.prop("disabled", true);
|
||||
}
|
||||
else {
|
||||
if (tanuloadatmodositasChecked != "false") {
|
||||
atsorolasiElem.parent().prop("disabled", false);
|
||||
atsorolasiElem.prop("disabled", false);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#myOsztalyfonok_modosithatja_osztalyaba_jaro_tanulok_adatait").change(function () {
|
||||
var tanuloadatmodositasChecked = $(this).val();
|
||||
var zaradekChecked = $("#myOsztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_zaradekat").val();
|
||||
var atsorolasiElem = $("#myOsztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat");
|
||||
if (tanuloadatmodositasChecked == "false") {
|
||||
if (atsorolasiElem.is(":checked")) {
|
||||
atsorolasiElem.prop("checked", true);
|
||||
SwitchButtonHelper.switchButtonChange("myOsztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat",
|
||||
"hiddenOsztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_ki_vagy_atsorolsasi_zaradekat");
|
||||
}
|
||||
atsorolasiElem.parent().prop("disabled", true);
|
||||
atsorolasiElem.prop("disabled", true);
|
||||
}
|
||||
else {
|
||||
if (zaradekChecked != "false") {
|
||||
atsorolasiElem.parent().prop("disabled", false);
|
||||
atsorolasiElem.prop("disabled", false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#myCsoportvezeto_Tanulo_Adat_Modositas").click(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
$("#myCsoportvezeto_Tanora_Celu_Csoportok").prop('checked', false);
|
||||
$("#hiddenCsoportvezeto_Tanora_Celu_Csoportok").closest('tr').addClass('disabledItem');
|
||||
}
|
||||
else {
|
||||
$("#myCsoportvezeto_Tanora_Celu_Csoportok").closest('tr').removeClass('disabledItem');
|
||||
$("#hiddenCsoportvezeto_Tanora_Celu_Csoportok").closest('tr').removeClass('disabledItem');
|
||||
}
|
||||
});
|
||||
|
||||
$("#myTanar_vehet_e_fel_orat_maganak").change(function () {
|
||||
var tanarVehetFelMaganakOratChecked = $(this).val();
|
||||
var ttfElem = $("#myLehet_orat_felvenni_TTF_nelkul");
|
||||
if (tanarVehetFelMaganakOratChecked == "false") {
|
||||
if (ttfElem.is(":checked")) {
|
||||
ttfElem.prop("checked", true);
|
||||
SwitchButtonHelper.switchButtonChange("myLehet_orat_felvenni_TTF_nelkul",
|
||||
"myLehet_orat_felvenni_TTF_nelkul");
|
||||
}
|
||||
ttfElem.parent().prop("disabled", true);
|
||||
ttfElem.prop("disabled", true);
|
||||
}
|
||||
else {
|
||||
ttfElem.parent().prop("disabled", false);
|
||||
ttfElem.prop("disabled", false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#Osszefuggo_gyakorlat_kezd_datum, #Osszefuggo_gyakorlat_veg_datum").change(function () {
|
||||
window.isSzakmaiGyakDatumIsChanged = true;
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,43 @@
|
|||
@using Kreta.Web.Helpers
|
||||
|
||||
<table>
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.JuttatasAdatokFrissiteseTitle</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">
|
||||
@SystemSettingsResource.JuttatasAdatokFrissiteseText
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
<div class="toLeft juttatasBeallitas BtnOk ">
|
||||
@Html.KretaButton("juttatasAdatokMindenTanuloraButton", SystemSettingsResource.JuttatasAdatokFrissiteseButtonText, clickEventName: "SettingsHelper.juttatasAdatokMindenTanuloraConfirm")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@*<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.TanuloiFeleviAtlagokFrissiteseTitle</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">
|
||||
@SystemSettingsResource.TanuloiFeleviAtlagokFrissiteseText
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
<div class="toLeft juttatasBeallitas BtnOk ">
|
||||
@Html.KretaButton("feleviAtlagokMindenTanuloraButton", SystemSettingsResource.TanuloiFeleviAtlagokFrissiteseButtonText, clickEventName: "SettingsHelper.feleviAtlagokMindenTanuloraConfirm")
|
||||
</div>
|
||||
</td>
|
||||
</tr>*@
|
||||
@*<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.TanuloiEvvegiAtlagokFrissiteseTitle</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">
|
||||
@SystemSettingsResource.TanuloiEvvegiAtlagokFrissiteseText
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
<div class="toLeft juttatasBeallitas BtnOk ">
|
||||
@Html.KretaButton("evvegiAtlagokMindenTanuloraButton", SystemSettingsResource.TanuloiEvvegiAtlagokFrissiteseButtonText, clickEventName: "SettingsHelper.evvegiAtlagokMindenTanuloraConfirm")
|
||||
</div>
|
||||
</td>
|
||||
</tr>*@
|
||||
</table>
|
|
@ -0,0 +1,45 @@
|
|||
@using Kreta.Web.Helpers
|
||||
|
||||
<table>
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.TantargyFelosztasTeljesTorleseTitle</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">
|
||||
@SystemSettingsResource.TantargyFelosztasTeljesTorleseText
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
<div class="toLeft rendszerszintuTorles BtnDelete ">
|
||||
@Html.KretaButton("tantargyFelosztasTeljesTorleseButton", SystemSettingsResource.TantargyFelosztasTeljesTorleseButtonText, clickEventName: "SettingsHelper.deleteTantargyfelosztasConfirm")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.TantargyFelosztasImportaltTorleseTitle</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">
|
||||
@SystemSettingsResource.TantargyFelosztasImportaltTorleseText
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
<div class="toLeft rendszerszintuTorles BtnDelete">
|
||||
@Html.KretaButton("tantargyFelosztasImportaltTorleseButton", SystemSettingsResource.TantargyFelosztasImportaltTorleseButtonText, clickEventName: "SettingsHelper.deleteImportaltTantargyfelosztasConfirm")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.OrarendekTeljesTorleseTitle</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">
|
||||
@SystemSettingsResource.OrarendekTeljesTorleseText
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
<div class="toLeft rendszerszintuTorles BtnDelete">
|
||||
@Html.KretaButton("orarendekTeljesTorleseButton", SystemSettingsResource.OrarendekTeljesTorleseButtonText, clickEventName: "SettingsHelper.deleteOrarendekConfirm")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,20 @@
|
|||
@using Kreta.Web.Areas.Adminisztracio.Models
|
||||
|
||||
@model ErtekelesModSulyListModel
|
||||
|
||||
@using (Html.KretaForm("GradeWeightsForm"))
|
||||
{
|
||||
<table>
|
||||
@foreach (var ertekelesModSuly in Model.ErtekelesModSulyList)
|
||||
{
|
||||
<tr style="padding: 10px;">
|
||||
<td width="80%" style="padding: 10px; font-weight:bold;">
|
||||
<label>@ertekelesModSuly.ErtekelesModNev</label>
|
||||
</td>
|
||||
<td width="20%" style="padding: 10px;">
|
||||
@Html.KretaNumeric(ertekelesModSuly.ErtekelesModId.ToString()).Value(ertekelesModSuly.Suly).Min(1).Max(1000).Format("#, \\%")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Security
|
||||
|
||||
@{ var disabledItem = ClaimData.IsSzirIntezmeny ? "disabledItem" : string.Empty; }
|
||||
|
||||
<table>
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.TanoraiCeluCsoportokBeallitasa</label>
|
||||
</td>
|
||||
<td width="60%" style="padding: 10px">
|
||||
@SystemSettingsResource.TanoraiCeluCsoportokBeallitasaDescription
|
||||
</td>
|
||||
<td width="25%" style="padding: 10px">
|
||||
<div>
|
||||
@Html.KretaButton("openCsoportTipusListPopup", SystemSettingsResource.TanoraiCeluCsoportokBeallitasa, clickEventName: "SettingsHelper.openCsoportTipusListWindow")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="padding: 10px;" class="@disabledItem">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.TanuloErtekelesMondatbankjanakBeallitasa</label>
|
||||
</td>
|
||||
<td width="60%" style="padding: 10px">
|
||||
@SystemSettingsResource.TanuloErtekelesMondatbankjanakBeallitasaDescription
|
||||
</td>
|
||||
<td width="25%" style="padding: 10px">
|
||||
<div>
|
||||
@Html.KretaButton("openTanuloErtekelesMondatbankPopup", SystemSettingsResource.TanuloErtekelesMondatbankjanakBeallitasa, clickEventName: "TanuloErtekelesMondatbankHelper.openTanuloErtekelesMondatbankPopup")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="padding: 10px;" class="@disabledItem">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@SystemSettingsResource.ErtekelesekSulyozasanakBeallitasa</label>
|
||||
</td>
|
||||
<td width="60%" style="padding: 10px">
|
||||
@SystemSettingsResource.ErtekelesekSulyozasanakBeallitasaDescription
|
||||
</td>
|
||||
<td width="25%" style="padding: 10px">
|
||||
<div>
|
||||
@Html.KretaButton("openGradeWeightWindow", SystemSettingsResource.ErtekelesekSulyozasanakBeallitasa, clickEventName: "SettingsHelper.openGradeWeightWindow")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@AdminisztracioResource.FejlecSzerkeszto</label>
|
||||
</td>
|
||||
<td width="60%" style="padding: 10px">
|
||||
@AdminisztracioResource.FejlecSzerkesztoDescription
|
||||
</td>
|
||||
<td width="25%" style="padding: 10px">
|
||||
<div>
|
||||
@Html.KretaButton("fejlecSzerkesztoWindow", AdminisztracioResource.FejlecSzerkeszto, clickEventName: "SettingsHelper.openFejlecSzerkesztoWindow")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr style="padding: 10px;">
|
||||
<td width="15%" style="padding: 10px; font-weight: bold;">
|
||||
<label>@AdminisztracioResource.LablecSzerkeszto</label>
|
||||
</td>
|
||||
<td width="60%" style="padding: 10px">
|
||||
@AdminisztracioResource.LablecSzerkesztoDescription
|
||||
</td>
|
||||
<td width="25%" style="padding: 10px">
|
||||
<div>
|
||||
@Html.KretaButton("lablecSzerkesztoWindow", AdminisztracioResource.LablecSzerkeszto, clickEventName: "SettingsHelper.openLablecSzerkesztoWindow")
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -0,0 +1,111 @@
|
|||
@using Kreta.Web.Models.EditorTemplates
|
||||
@using Kreta.BusinessLogic.Helpers.SystemSettings
|
||||
@using Kreta.Enums;
|
||||
@using Kreta.KretaServer.SystemSettings.SettingsTypes
|
||||
|
||||
@model PanelBarChildModel
|
||||
|
||||
<table>
|
||||
@foreach (var item in Model.Data)
|
||||
{
|
||||
SystemSettingControlInfo setting = (SystemSettingControlInfo)item;
|
||||
if (setting.Control == null) { continue; }
|
||||
SystemSettingsControlTypeEnum controlType = setting.ControlType;
|
||||
var controlId = ((SettingsControlBase)setting.Control).Id;
|
||||
|
||||
<tr style="padding: 10px;" @if (setting.Disabled) { Write("class=disabledItem"); }>
|
||||
|
||||
<td width="15%" style="padding: 10px; font-weight:bold">
|
||||
<label for="@controlId">@setting.Title</label>
|
||||
</td>
|
||||
<td width="65%" style="padding: 10px">@setting.Description</td>
|
||||
<td width="20%" style="padding: 10px">
|
||||
@switch (controlType)
|
||||
{
|
||||
//case SystemSettingsControlTypeEnum.CheckBox:
|
||||
// var checkBox = (SettingsCheckBox)setting.Control;
|
||||
// Html.KretaCheckBox(checkBox.Id, StringResourcesUtils.GetString(checkBox.StringResourcesID), checkBox.IsSelected);
|
||||
// break;
|
||||
case SystemSettingsControlTypeEnum.CheckBoxGroup:
|
||||
var checkBoxGroup = (SettingsCheckBoxGroup)setting.Control;
|
||||
@Html.KretaCheckBoxList(checkBoxGroup.Id, checkBoxGroup.Options)
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.MultiSelect:
|
||||
var multiSelect = (SettingsMultiSelect)setting.Control;
|
||||
if (controlId == RendszerBeallitasTipusEnum.lezart_osztalynaplok.ToString())
|
||||
{
|
||||
@Html.KretaMultiSelect(multiSelect.Id, multiSelect.Options, isSingleElementSet: false)
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.KretaMultiSelect(multiSelect.Id, multiSelect.Options)
|
||||
}
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.DatePicker:
|
||||
var datePicker = (SettingsDatePicker)setting.Control;
|
||||
@Html.KretaDatePicker(datePicker.Id, minValue: datePicker.Min, maxValue: datePicker.Max).Value(datePicker.Date).RenderWithMask()
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.TimePicker:
|
||||
var timePicker = (SettingsTimePicker)setting.Control;
|
||||
@Html.KretaTimePicker(timePicker.Id, interval: 15).Value(timePicker.Time).RenderWithMask()
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.NumericTextBox:
|
||||
var numericTextBox = (SettingsNumericTextBox)setting.Control;
|
||||
//TODO: ennél majd szebb megoldás kell, pl: SystemsPercentageTextBox
|
||||
if (controlId == RendszerBeallitasTipusEnum.Szakszeru_helyettesites_eseten_az_elszamolt_oraszam.ToString() ||
|
||||
controlId == RendszerBeallitasTipusEnum.Nem_szakszeru_felugyelet_helyettesites_eseten_az_elszamolt_oraszam.ToString() ||
|
||||
controlId == RendszerBeallitasTipusEnum.Oraosszevonasos_helyettesites_eseten_az_elszamolt_oraszam.ToString()
|
||||
)
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Format("p0").Min(0).Max(1).Step(0.01).Value(numericTextBox.Value)
|
||||
}
|
||||
else if (controlId == RendszerBeallitasTipusEnum.Naplozaras_heti_ertek.ToString())
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Min(0).Max(7).Step(1).Format("n0");
|
||||
}
|
||||
else if (controlId == RendszerBeallitasTipusEnum.Naplozaras_havi_ertek.ToString())
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Min(0).Max(31).Step(1).Format("n0");
|
||||
}
|
||||
else if (controlId == RendszerBeallitasTipusEnum.Ervenyes_tanitasi_nap_oraszam.ToString())
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Min(0).Max(24).Step(1).Format("n0");
|
||||
}
|
||||
else if ((controlId == RendszerBeallitasTipusEnum.Szakszeru_helyettesites_Szazalekos_Ertek_Osszegbe.ToString()) || (controlId == RendszerBeallitasTipusEnum.Nem_Szakszeru_Helyettesites_Szazalekos_Ertek_Osszegbe.ToString()) || (controlId == RendszerBeallitasTipusEnum.Oraosszevonas_Szazalekos_Ertek_Osszegbe.ToString()) || (controlId == RendszerBeallitasTipusEnum.Osszevont_Felugyelet_Szazalekos_Ertek_Osszegbe.ToString()))
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Min(0).Max(100).Step(1).Format("n0");
|
||||
}
|
||||
else if (controlId == RendszerBeallitasTipusEnum.Bukas_Veszelyre_Figyelmeztetes_Hatara.ToString())
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Min(1.00).Max(2.50).Step(0.01).Format("n2");
|
||||
}
|
||||
else if (controlId == RendszerBeallitasTipusEnum.Egy_statuszra_juto_kotelezo_oraszam.ToString())
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Min(0.00).Max(40).Step(0.01).Format("n2");
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.KretaNumeric(numericTextBox.Id).Value(numericTextBox.Value).Step(1);
|
||||
}
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.DropDownList:
|
||||
var dropDownList = (SettingsDropDownList)setting.Control;
|
||||
@Html.KretaDropdownList(dropDownList.Id, dropDownList.Options);
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.RadioButtonGroup:
|
||||
var radioButtonGroup = (SettingsRadioButtonGroup)setting.Control;
|
||||
@Html.KretaRadioButtonList(radioButtonGroup.Id, radioButtonGroup.Options)
|
||||
break;
|
||||
case SystemSettingsControlTypeEnum.TrueFalse:
|
||||
var switchButton = (SettingsSwitchButton)setting.Control;
|
||||
<div style="padding-left:80px;">
|
||||
@Html.KretaSwitchButton(switchButton.Id, switchButton.Value)
|
||||
</div>
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
|
@ -0,0 +1,97 @@
|
|||
@using Kreta.BusinessLogic.Logic.TanuloErtekeles
|
||||
@using Kreta.Web.Areas.Adminisztracio.Controllers
|
||||
@using Kreta.Web.Areas.Adminisztracio.Models
|
||||
|
||||
@model TanuloErtekelesMondatbankItemModel
|
||||
|
||||
@{
|
||||
var formName = SystemSettingsController.TanuloErtekelesMondatbankItemEditFormName;
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
setErtekelesNyelviesitesVisibility("@Model.TanuloErtekelesTipusId", ".nyelviesitesDiv");
|
||||
});
|
||||
|
||||
$("#TanuloErtekelesTipusId").change(function () {
|
||||
setErtekelesNyelviesitesVisibility($("#TanuloErtekelesTipusId").val(), ".nyelviesitesDiv");
|
||||
});
|
||||
|
||||
function setErtekelesNyelviesitesVisibility(tipusId, selector) {
|
||||
if (CommonUtils.isNullOrUndefined(tipusId)) {
|
||||
$(selector).removeClass("showNyelviesites").addClass("hideNyelviesites");
|
||||
}
|
||||
var nyelviesithetoTanuloErtekelesTipusIdArray = @Html.Raw(Json.Encode(TanuloErtekelesLogicBase.NyelviesithetoTanuloErtekelesTipusIdList));
|
||||
if (nyelviesithetoTanuloErtekelesTipusIdArray.includes(parseInt(tipusId))) {
|
||||
$(selector).removeClass("hideNyelviesites").addClass("showNyelviesites");
|
||||
} else {
|
||||
$(selector).removeClass("showNyelviesites").addClass("hideNyelviesites");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@using (Html.KretaForm(formName))
|
||||
{
|
||||
@Html.KretaValidationSummary()
|
||||
|
||||
@Html.HiddenFor(x => x.ID)
|
||||
|
||||
<div class="container-fluid details">
|
||||
<div class="row">
|
||||
@Html.KretaComboBoxFor(x => x.TanuloErtekelesTipusId, Model.TipusList).RenderWithName(2, 6, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaComboBoxFor(x => x.EvfolyamTipusId, Model.EvfolyamTipusList).RenderWithName(2, 6, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaComboBoxFor(x => x.TantargyId, Model.TantargyList).RenderWithName(2, 6, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaTextBoxFor(x => x.RovidNev).RenderWithName(2, 2, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
@Html.LabelFor(x => x.Szoveg, null, new Dictionary<string, object> { { "class", "windowInputLabel" } })
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
@(Html.KretaHtmlEditorFor(m => m.Szoveg)
|
||||
.Resizable(false)
|
||||
.Tools(tools => tools
|
||||
.Clear()
|
||||
.Bold()
|
||||
.Italic()
|
||||
.Underline()
|
||||
.SubScript()
|
||||
.SuperScript()))
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.IsNyelviesitesActive)
|
||||
{
|
||||
if (Model.IsNemetNemzetiDokumentumNyelvActive)
|
||||
{
|
||||
<div class="row nyelviesitesDiv hideNyelviesites">
|
||||
@Html.KretaTextAreaFor(x => x.SzovegNemet, 5).RenderWithName(2, 10, true)
|
||||
</div>
|
||||
}
|
||||
if (Model.IsHorvatNemzetiDokumentumNyelvActive)
|
||||
{
|
||||
<div class="row nyelviesitesDiv hideNyelviesites">
|
||||
@Html.KretaTextAreaFor(x => x.SzovegHorvat, 5).RenderWithName(2, 10, true)
|
||||
</div>
|
||||
}
|
||||
if (Model.IsRomanNemzetiDokumentumNyelvActive)
|
||||
{
|
||||
<div class="row nyelviesitesDiv hideNyelviesites">
|
||||
@Html.KretaTextAreaFor(x => x.SzovegRoman, 5).RenderWithName(2, 10, true)
|
||||
</div>
|
||||
}
|
||||
if (Model.IsSzerbNemzetiDokumentumNyelvActive)
|
||||
{
|
||||
<div class="row nyelviesitesDiv hideNyelviesites">
|
||||
@Html.KretaTextAreaFor(x => x.SzovegSzerb, 5).RenderWithName(2, 10, true)
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
@using Kreta.Web.Areas.Adminisztracio.Controllers
|
||||
@using Kreta.Web.Areas.Adminisztracio.Models
|
||||
@using Newtonsoft.Json
|
||||
@using Kreta.Enums
|
||||
@model TanuloErtekelesMondatbankTobbesItemModel
|
||||
|
||||
@{
|
||||
var formName = SystemSettingsController.TanuloErtekelesMondatbankItemEditFormName;
|
||||
}
|
||||
|
||||
<style type="text/css">
|
||||
.checkbox_padding {
|
||||
padding-top: 5px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@using (Html.KretaForm(formName))
|
||||
{
|
||||
@Html.KretaValidationSummary()
|
||||
|
||||
<div class="container-fluid details">
|
||||
<div class="row">
|
||||
@Html.KretaComboBoxFor(x => x.TanuloErtekelesTipusId, Model.TipusList).RenderWithName(2, 6, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaComboBoxFor(x => x.EvfolyamTipusId, Model.EvfolyamTipusList).RenderWithName(2, 6, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaComboBoxFor(x => x.TantargyId, Model.TantargyList).RenderWithName(2, 6, true)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaCheckBoxFor(x => x.RovidNevEnabled).RenderWithName(3, 1, "checkbox_padding")
|
||||
@Html.KretaTextBoxFor(x => x.RovidNev).RenderWithName("", 1, 2)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaTextAreaFor(x => x.Szoveg, 5).RenderWithName(2, 10, true)
|
||||
</div>
|
||||
</div>
|
||||
@Html.HiddenFor(x => x.SelectedIdListJson);
|
||||
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('#RovidNevEnabled').bind('change', function (data) {
|
||||
$('#RovidNev').prop('readOnly', !$('#RovidNevEnabled').prop('checked'));
|
||||
});
|
||||
$('#RovidNev').prop('readOnly', !$('#RovidNevEnabled').prop('checked'));
|
||||
$('label[for="RovidNev"]').parent().addClass('hidden');
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,155 @@
|
|||
@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>
|
Loading…
Add table
Add a link
Reference in a new issue