init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
266
KretaWeb/Areas/Adatszolgaltatasok/Views/SZIRStat/Index.cshtml
Normal file
266
KretaWeb/Areas/Adatszolgaltatasok/Views/SZIRStat/Index.cshtml
Normal file
|
@ -0,0 +1,266 @@
|
|||
@using Kreta.Framework
|
||||
@using Kreta.Web.Helpers;
|
||||
@using System.Web.Optimization
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Enums.ManualEnums
|
||||
@model Kreta.Web.Models.EditorTemplates.PanelBarBaseModel
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/_MasterLayout.cshtml";
|
||||
}
|
||||
|
||||
<div class="buttonContainer">
|
||||
<div class="toRight">
|
||||
@Html.KretaButton("openPanelBar", NyomtatvanyokResource.OsszesPanelKinyitasa, clickEventName: "SZIRStatHelper.OpenPanelBar")
|
||||
</div>
|
||||
<div class="toRight">
|
||||
@Html.KretaButton("closePanelBar", NyomtatvanyokResource.OsszesPanelBezarasa, clickEventName: "SZIRStatHelper.ClosePanelBar")
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
@Html.Partial("EditorTemplates/PanelBar", Model)
|
||||
|
||||
@using (Html.KretaForm("DownloadFile", "SZIRStat", FormMethod.Post, "dokumentumLetolteseForm"))
|
||||
{
|
||||
<div style="float:right;display:none;">
|
||||
@Html.KretaButton("kretaDownloadSubmit", NyomtatvanyokResource.Letoltes, "submit")
|
||||
<div style="float:right;">
|
||||
@Html.Hidden("FileIdHiddenField");
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
function createKendoWindow(identity, title, actions, resizable, closeFunction) {
|
||||
var element = $('#' + identity);
|
||||
|
||||
if (!element.length) {
|
||||
element = $('<div></div>').appendTo('body');
|
||||
element.attr('id', identity);
|
||||
}
|
||||
|
||||
var modal = element.data('kendoWindow');
|
||||
|
||||
var position = {
|
||||
top: 100,
|
||||
left: '10%',
|
||||
};
|
||||
|
||||
if (!modal) {
|
||||
modal = element.kendoWindow({
|
||||
title: title,
|
||||
width: '80%',
|
||||
actions: actions ? actions : ['Maximize', 'Close'],
|
||||
visible: false,
|
||||
modal: true,
|
||||
resizable: resizable,
|
||||
position: position,
|
||||
close: function () {
|
||||
if (typeof closeFunction == 'function')
|
||||
closeFunction();
|
||||
|
||||
element.empty();
|
||||
}
|
||||
}).data('kendoWindow');
|
||||
}
|
||||
else {
|
||||
modal.setOptions({ position: position });
|
||||
}
|
||||
|
||||
return modal;
|
||||
}
|
||||
|
||||
function openKendoWindow(modal, center) {
|
||||
if (modal) {
|
||||
if (center)
|
||||
modal.center();
|
||||
|
||||
modal.open();
|
||||
}
|
||||
}
|
||||
|
||||
function closeKendoWindow(identity) {
|
||||
var modal = $('#' + identity).data('kendoWindow');
|
||||
if (modal)
|
||||
modal.close();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var SZIRStatHelper = (function () {
|
||||
var szirStatHelper = function () { };
|
||||
var url = {
|
||||
saveDokumentum: "@Url.Action("UploadFile", "SZIRStat", new { area = "Adatszolgaltatasok" })",
|
||||
downloadDokumentum: "@Url.Action("DownloadFile", "SZIRStat", new { area = "Adatszolgaltatasok" })",
|
||||
deleteDokumentum: "@Url.Action("DeleteFile", "SZIRStat", new { area = "Adatszolgaltatasok" })",
|
||||
};
|
||||
|
||||
szirStatHelper.MaskedClick = function (Statusz, buttonControlId) {
|
||||
if (Statusz == "@FileStatuszEnum.Feltoltve") {
|
||||
KretaWindowHelper.confirmWindow("@(CommonResource.Kerdes)", "@(CommonResource.FeltoltesFigyelmeztetes)", function () { $("#"+buttonControlId).click(); });
|
||||
}
|
||||
else {
|
||||
$("#"+buttonControlId).click();
|
||||
}
|
||||
}
|
||||
|
||||
szirStatHelper.onSelect = function (e) {
|
||||
KretaFileUpload.StopAnimation();
|
||||
var allowedFileExtensionArray = [".xlsx", ".xls", ".rar", ".zip"];
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
szirStatHelper.uploadDokumentum = function (SzirStatTipusId, FeladatellatasiHelyId,e) {
|
||||
var token = $("input[name='__RequestVerificationToken']").val();
|
||||
e.sender.options.async.saveUrl = url.saveDokumentum;
|
||||
e.data = { SzirStatTipusId: SzirStatTipusId, FeladatellatasiHelyId: FeladatellatasiHelyId };
|
||||
var xhr = e.XMLHttpRequest;
|
||||
if (xhr) {
|
||||
xhr.addEventListener("readystatechange", function (e) {
|
||||
if (xhr.readyState == 1 /* OPENED */) {
|
||||
xhr.setRequestHeader("X-Request-Verification-Token", token);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
szirStatHelper.onComplete = function (SzirStatTipusId, FeladatellatasiHelyId, e) {
|
||||
var url = "@(Html.Raw(Url.Action("LoadSZIRStatDokumentumPartial", "SZIRStat")))";
|
||||
$('#PanelChild' + SzirStatTipusId + "_" + FeladatellatasiHelyId).parent().load(url, { model: { "SzirStatTipusId": SzirStatTipusId, "FeladatellatasiHelyId": FeladatellatasiHelyId} });
|
||||
}
|
||||
szirStatHelper.deleteDokumentumAndReload = function (SzirStatTipusId, FeladatellatasiHelyId, e) {
|
||||
var url = "@(Html.Raw(Url.Action("DeleteAndReLoadSZIRStatDokumentumPartial", "SZIRStat")))";
|
||||
$('#PanelChild' + SzirStatTipusId + "_" + FeladatellatasiHelyId).parent().load(url, { model: { "SzirStatTipusId": SzirStatTipusId, "FeladatellatasiHelyId": FeladatellatasiHelyId} });
|
||||
}
|
||||
|
||||
szirStatHelper.onError = function (e) {
|
||||
KretaWindowHelper.feedbackWindow("@CommonResource.Hiba", "@ErrorResource.SikertelenFeltoltesKotelezoDokumentumon", true);
|
||||
}
|
||||
|
||||
szirStatHelper.downloadDokumentum = function (data) {
|
||||
$("#FileIdHiddenField").val(data);
|
||||
$("#kretaDownloadSubmit").click();
|
||||
}
|
||||
|
||||
szirStatHelper.Letoltes = function (rowData) {
|
||||
}
|
||||
szirStatHelper.OpenPanelBar = function () {
|
||||
var panelBar = $('#SZIRStatPanel').data('kendoPanelBar');
|
||||
panelBar.expand($('#SZIRStatPanel li'), false);
|
||||
};
|
||||
|
||||
szirStatHelper.ClosePanelBar = function () {
|
||||
var panelBar = $('#SZIRStatPanel').data('kendoPanelBar');
|
||||
panelBar.collapse($('#SZIRStatPanel li'));
|
||||
};
|
||||
|
||||
return szirStatHelper;
|
||||
})();
|
||||
</script>
|
||||
|
||||
<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;
|
||||
}
|
||||
|
||||
.dokumentum-item-padding {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dokumentum-item-type {
|
||||
padding-top: 15px;
|
||||
font-size: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
i.dokumentum-item-padding {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
a[id^="download"], a[id^="delete"] {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.dokumentum-item-filename {
|
||||
word-wrap: break-word;
|
||||
font-size: 12px;
|
||||
line-height: 2;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
overflow: hidden auto;
|
||||
}
|
||||
|
||||
.k-upload-status {
|
||||
position: relative;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.szir-stat-row {
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.k-upload-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.masked-button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.k-panelbar-collapse, .k-panelbar-expand {
|
||||
right: 54px;
|
||||
position: absolute;
|
||||
margin-top: 26px;
|
||||
top: unset;
|
||||
}
|
||||
.kretaLabelTooltip .kretaLabelTooltipImg{
|
||||
padding: 0 0 20px 10px;
|
||||
}
|
||||
.padding0{
|
||||
padding: 0 0 0 0;
|
||||
}
|
||||
.padding10{
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
.paddingtop15{
|
||||
padding-top: 15px;
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue