init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
@using Kreta.Web.Areas.TanuloErtekeles.Models
|
||||
@using Kreta.Web.Helpers
|
||||
@model FeljegyzesModel
|
||||
|
||||
<div class="container-fluid details">
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.DatumString, 3, 3)
|
||||
@Html.KretaLabelFor(x => x.FeljegyzoNev, 3, 3)
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.Cim, 3, 9)
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="@BootsrapHelper.GetSizeClasses(3)">
|
||||
@Html.LabelFor(x => x.Tartalom, htmlAttributes: new Dictionary<string, object> { { "class", "windowInputLabel" } })
|
||||
</div>
|
||||
<div class="@BootsrapHelper.GetSizeClasses(9)">
|
||||
@Html.Raw(Model.Tartalom)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@Html.KretaLabelFor(x => x.Megjegyzes, 3, 9)
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,104 @@
|
|||
@using Kreta.BusinessLogic.Classes
|
||||
@using Kreta.Web.Helpers
|
||||
@using Kreta.Web.Helpers.Grid
|
||||
@using Kreta.Web.Areas.TanuloErtekeles.Models
|
||||
|
||||
@model int?
|
||||
|
||||
<div>
|
||||
@(
|
||||
Html.KretaGrid<InformaciokFeljegyzesekGridModel>(
|
||||
"InformaciokFeljegyzesekGrid",
|
||||
new GridApiUrl("FeljegyzesekApi", "GetInformaciokFeljegyzesekGrid"),
|
||||
sort: sort => sort.Add(m => m.Datum).Descending(),
|
||||
allowPaging: false,
|
||||
pageSizes: null,
|
||||
allowScrolling: true,
|
||||
dataBoundAdditionalFunction: "InformaciokFeljegyzesekHelper.HighlightRowIf();"
|
||||
)
|
||||
.Columns(columns =>
|
||||
{
|
||||
columns.Bound(m => m.ID).Hidden();
|
||||
columns.Bound(m => m.Datum).Format(SDAFormat.Format[SDAFormat.FormatType.ShortDate]);
|
||||
columns.Bound(m => m.Tipus_DNAME).SetDisplayPropertyWithToolip("Tipus_DNAME");
|
||||
columns.Bound(m => m.TanarElotagNelkul).SetDisplayPropertyWithToolip("Tanar");
|
||||
columns.Bound(m => m.Cim).SetDisplayPropertyWithToolip("Cim");
|
||||
columns.Bound(m => m.Tartalom).SetDisplayPropertyWithToolip("Tartalom");
|
||||
})
|
||||
.RowFunction(Html, new List<RowFunction> { new RowFunction { Name = CommonResource.Vagolap, ClientAction = "InformaciokFeljegyzesekHelper.CopyToClipboard", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Vagolap }, new RowFunction {NameResourceId = 118 /*Adatok*/, ClientAction = "InformaciokFeljegyzesekHelper.openFeljegyzesAdatok", IconEnum = Kreta.Enums.ManualEnums.GridRowFunctionIconEnum.Adatok} })
|
||||
.Sortable(sortable => sortable
|
||||
.AllowUnsort(true)
|
||||
.SortMode(GridSortMode.MultipleColumn))
|
||||
)
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var InformaciokFeljegyzesekHelper = {};
|
||||
@if (Model.HasValue)
|
||||
{
|
||||
@Html.Raw(@"
|
||||
InformaciokFeljegyzesekHelper.GetRowUidById = function (id) {
|
||||
var data = $(""#InformaciokFeljegyzesekGrid"").data().kendoGrid.dataSource.data();
|
||||
for (let property in data) {
|
||||
if (data.hasOwnProperty(property) && data[property].ID == id) { return data[property].uid; }
|
||||
}
|
||||
}
|
||||
InformaciokFeljegyzesekHelper.HighlightRow = function (id) {
|
||||
$(""[data-uid="" + InformaciokFeljegyzesekHelper.GetRowUidById(id) + ""]"").each(function () {
|
||||
this.style.backgroundColor = ""#54A5D1"";
|
||||
});
|
||||
}
|
||||
")
|
||||
}
|
||||
InformaciokFeljegyzesekHelper.CopyToClipboard = function (rowdata) {
|
||||
var targetId = "_hiddenCopyText_";
|
||||
|
||||
if ($('#' + targetId).length === 0) {
|
||||
target = document.createElement("textarea");
|
||||
target.style.position = "absolute";
|
||||
target.style.left = "-9999px";
|
||||
target.style.top = "0px";
|
||||
target.id = targetId;
|
||||
document.body.appendChild(target);
|
||||
}
|
||||
|
||||
var targetElem = document.getElementById(targetId);
|
||||
targetElem.textContent = rowdata["Cim"] + "\r\n" + rowdata["Tartalom"];
|
||||
var currentFocus = document.activeElement;
|
||||
targetElem.select();
|
||||
targetElem.setSelectionRange(0, targetElem.textContent.length);
|
||||
var succeed = document.execCommand("copy");
|
||||
if (succeed) {
|
||||
KretaWindowHelper.successFeedBackWindow(null, "@CommonResource.SikeresVagolapraMasolas");
|
||||
}
|
||||
else {
|
||||
KretaWindowHelper.notification("@CommonResource.SikertelenVagolapraMasolas", "error");
|
||||
}
|
||||
targetElem.textContent = "";
|
||||
if (currentFocus && typeof currentFocus.focus === "function") {
|
||||
currentFocus.focus();
|
||||
}
|
||||
}
|
||||
InformaciokFeljegyzesekHelper.HighlightRowIf = function(){
|
||||
if (typeof this.HighlightRow === "function") {
|
||||
InformaciokFeljegyzesekHelper.HighlightRow(@Model);
|
||||
}
|
||||
}
|
||||
|
||||
InformaciokFeljegyzesekHelper.openFeljegyzesAdatok = function (rowData) {
|
||||
var url = "@Url.Action("OpenFeljegyzesAdatok", "InformaciokFeljegyzesek", new { area = "TanuloErtekeles" })";
|
||||
AjaxHelper.DoGet(url, { feljegyzesId: rowData.ID, tanuloId: rowData.TanuloId }, popUpFeljegyzesAdatok);
|
||||
}
|
||||
|
||||
InformaciokFeljegyzesekHelper.adatokCancel = function () {
|
||||
KretaWindowHelper.destroyWindow("FeljegyzesAdatokWindow");
|
||||
}
|
||||
|
||||
function popUpFeljegyzesAdatok(data) {
|
||||
var config = KretaWindowHelper.getWindowConfigContainer();
|
||||
config.title = "@(FeljegyzesekResource.FeljegyzesAdatai)";
|
||||
config.content = data;
|
||||
var modal = KretaWindowHelper.createWindow("FeljegyzesAdatokWindow", config);
|
||||
KretaWindowHelper.openWindow(modal, true);
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue