Sicherung
This commit is contained in:
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34031.279
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSI.Prj.Mgt", "FSI.Prj.Mgt\FSI.Prj.Mgt.csproj", "{11D12404-4367-4DAF-81B6-DBB3D1210C50}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSI.Prj.Mgt", "FSI.Prj.Mgt\FSI.Prj.Mgt.csproj", "{11D12404-4367-4DAF-81B6-DBB3D1210C50}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
@@ -184,7 +184,12 @@ namespace FSI.Prj.Mgt.Controllers
|
||||
|
||||
_context.SaveChanges();
|
||||
|
||||
return PartialView("_CreateEditPartial", project);
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
public async Task<JsonResult> OnGetCreateOrEditAsync(int id, Project customer)
|
||||
{
|
||||
return new JsonResult(new { isValid = true, html = "" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.11" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.9" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="X.PagedList.Mvc.Core" Version="8.4.7" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
|
||||
<h1> Projekt-Übersicht</h1>
|
||||
|
||||
@* <form asp-action="CreateEdit">
|
||||
<form asp-action="CreateEdit">
|
||||
<button type="submit" class="btn btn-primary"><i class="bi bi-plus-square"></i> neues Projekt erstellen</button>
|
||||
</form>
|
||||
*@
|
||||
|
||||
<hr />
|
||||
<form asp-action="Index" method="get">
|
||||
<p>
|
||||
Suchen nach: <input type="text" name="SearchString" value="" />
|
||||
@@ -88,39 +89,3 @@
|
||||
})
|
||||
</nav>
|
||||
|
||||
<div id="PlaceHolderHere"></div>
|
||||
|
||||
<button type="button" class="btn btn-primary" data-toggle="ajax-modal" data-target="#addProject" data-url="@Url.Action("Create")">Create</button>
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
|
||||
Launch demo modal
|
||||
</button>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
...
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
@model FSI.Prj.Mgt.Models.Project
|
||||
|
||||
|
||||
|
||||
@* <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
|
||||
*@
|
||||
|
||||
<div class="modal fade" id="addProject">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="addProjectLabel">neues Project anlegen</h4>
|
||||
<button type="button" class="btn-close" data-dismiss="modal">
|
||||
<span>X</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
@* <div class="modal fade" id="addProject" >
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addProjectLabel">neues Projekt anlegen</h5>
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="Create">
|
||||
|
||||
<div class="row">
|
||||
<div class="col mb-3">
|
||||
<input asp-for="Id" placeholder="ID" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col mb-3">
|
||||
<input asp-for="No" placeholder="Projekt-Nr." class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col mb-3">
|
||||
<select asp-for="PlantId" class="form-control" asp-items="@(new SelectList(@ViewBag.Plants, "Id", "OutSh"))"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col mb-3">
|
||||
<input asp-for="Name" placeholder="Name" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col mb-3">
|
||||
<input asp-for="Description" placeholder="Beschreibung" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col mb-3">
|
||||
<select asp-for="Status" asp-items="Html.GetEnumSelectList<FSI.Prj.Mgt.Models.ProjectStatus>()" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class=" btn btn-primary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class=" btn btn-primary" data-save="modal">erstellen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
@* <script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$('.modal-content').resizable({
|
||||
alsoResize: ".modal-dialog",
|
||||
minHeight: 300,
|
||||
minWidth: 300
|
||||
});
|
||||
$('.modal-dialog').draggable();
|
||||
|
||||
$('#myModal').on('show.bs.modal', function () {
|
||||
$(this).find('.modal-body').css({
|
||||
'max-height': '100%'
|
||||
});
|
||||
});
|
||||
</script> *@
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>FSI.Prj.Mgt - @ViewData["Title"]</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||
<link rel="stylesheet" href="~/FSI.Prj.Mgt.styles.css" asp-append-version="true" />
|
||||
<link href="~/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet" />
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
@await RenderSectionAsync("Scripts", required: false)
|
||||
</body>
|
||||
|
||||
@@ -2,29 +2,3 @@
|
||||
// for details on configuring this project to bundle and minify static web assets.
|
||||
|
||||
// Write your JavaScript code.
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
var PlaceHolderElement = $('#PlaceHolderHere');
|
||||
|
||||
$('button[data-toggle="ajax-modal"]').click(function (event) {
|
||||
|
||||
var url = $(this).data('url');
|
||||
var decodeUrl = decodeURIComponent(url);
|
||||
$.get(decodeUrl).done(function (data) {
|
||||
PlaceHolderElement.html(data);
|
||||
PlaceHolderElement.find('.modal').modal('show');
|
||||
})
|
||||
})
|
||||
|
||||
PlaceHolderElement.on('click', '[data-save="modal"]', function (event) {
|
||||
var form = $(this).parents('.modal').find('form');
|
||||
var actionUrl = form.attr('action');
|
||||
var url = "/project/" + actionUrl;
|
||||
var sendData = from.serialize();
|
||||
$.post(url, sendData).done(function (data) {
|
||||
PlaceHolderElement.find('.modal').modal('hide');
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user