colors (ctor)
This commit is contained in:
parent
8e658d2bb4
commit
fab5854f8b
31 changed files with 16278 additions and 10579 deletions
41
Yavsc/Views/Colors/Create.cshtml
Normal file
41
Yavsc/Views/Colors/Create.cshtml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
@model Color
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>Color</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger" >
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">
|
||||
Indication de couleur
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
@await Html.PartialAsync("ColorEditor",Model)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
28
Yavsc/Views/Colors/Delete.cshtml
Normal file
28
Yavsc/Views/Colors/Delete.cshtml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@model Yavsc.Models.Drawing.Color
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Color</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
26
Yavsc/Views/Colors/Details.cshtml
Normal file
26
Yavsc/Views/Colors/Details.cshtml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
@model Yavsc.Models.Drawing.Color
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Color</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Color)
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
35
Yavsc/Views/Colors/Edit.cshtml
Normal file
35
Yavsc/Views/Colors/Edit.cshtml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
@model Yavsc.Models.Drawing.Color
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>Color</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Red" />
|
||||
<input type="hidden" asp-for="Green" />
|
||||
<input type="hidden" asp-for="Blue" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Name" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
33
Yavsc/Views/Colors/Index.cshtml
Normal file
33
Yavsc/Views/Colors/Index.cshtml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@model IEnumerable<Color>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@SR["Les couleurs"]
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(l => item)
|
||||
@Html.DisplayFor(l => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
32
Yavsc/Views/HairTaints/Create.cshtml
Normal file
32
Yavsc/Views/HairTaints/Create.cshtml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
@model Yavsc.Models.Haircut.HairTaint
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>HairTaint</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Brand" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Brand" class="form-control" />
|
||||
<span asp-validation-for="Brand" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Create" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
28
Yavsc/Views/HairTaints/Delete.cshtml
Normal file
28
Yavsc/Views/HairTaints/Delete.cshtml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@model Yavsc.Models.Haircut.HairTaint
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>HairTaint</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Brand)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Brand)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
24
Yavsc/Views/HairTaints/Details.cshtml
Normal file
24
Yavsc/Views/HairTaints/Details.cshtml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
@model Yavsc.Models.Haircut.HairTaint
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>HairTaint</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Brand)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Brand)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
33
Yavsc/Views/HairTaints/Edit.cshtml
Normal file
33
Yavsc/Views/HairTaints/Edit.cshtml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
@model Yavsc.Models.Haircut.HairTaint
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>HairTaint</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<label asp-for="Brand" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Brand" class="form-control" />
|
||||
<span asp-validation-for="Brand" class="text-danger" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
32
Yavsc/Views/HairTaints/Index.cshtml
Normal file
32
Yavsc/Views/HairTaints/Index.cshtml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
@model IEnumerable<Yavsc.Models.Haircut.HairTaint>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Brand)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Brand)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
48
Yavsc/Views/Shared/ColorEditor.cshtml
Normal file
48
Yavsc/Views/Shared/ColorEditor.cshtml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
@model Color
|
||||
<div>
|
||||
|
||||
<div id="clrprv" style="border:solid grey 1px; width:1em; height:1em; display: inline-block; height:3em; width:5em;"></div>
|
||||
|
||||
<div style="display: inline-block; width:15em; margin:.3em;">
|
||||
<div id="sred" class="slider" style="background-color:red;"></div>
|
||||
<div id="sgreen" class="slider" style="background-color:green;"></div>
|
||||
<div id="sblue" class="slider" style="background-color:blue;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="Red" name="Red" />
|
||||
<input type="hidden" id="Green" name="Green" />
|
||||
<input type="hidden" id="Blue" name="Blue" />
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var red = @Model.Red;
|
||||
var green = @Model.Green;
|
||||
var blue = @Model.Blue;
|
||||
|
||||
$(".slider").slider(
|
||||
{
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
});
|
||||
var updateColor = function() {
|
||||
$("#clrprv").css("background-color","rgb("+red+","+green+","+blue+")");
|
||||
$("#Red").val(red);
|
||||
$("#Green").val(green);
|
||||
$("#Blue").val(blue);
|
||||
console.log($("#Blue").val());
|
||||
};
|
||||
$("#sred").on("slide",function(event, ui){
|
||||
red=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
$("#sgreen").on("slide",function(event, ui){
|
||||
green=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
$("#sblue").on("slide",function(event, ui){
|
||||
blue=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
2
Yavsc/Views/Shared/DisplayTemplates/Color.cshtml
Normal file
2
Yavsc/Views/Shared/DisplayTemplates/Color.cshtml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@model Color
|
||||
<div style="background-color:@Model.Color(); border:solid grey 1px; width:1em; height:1em; display: inline-block;"></div>
|
||||
|
|
@ -8,13 +8,14 @@
|
|||
<environment names="Development">
|
||||
<link rel="stylesheet" href="~/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
<link rel="stylesheet" href="~/css/jquery-ui.css" />
|
||||
</environment>
|
||||
<environment names="Staging,Production,yavsc,yavscpre,zicmoove,lua">
|
||||
<link rel="stylesheet" href="~/css/bootstrap.min.css" asp-append-version="true"/>
|
||||
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||
</environment>
|
||||
<environment names="Development">
|
||||
<script src="~/js/jquery.js"></script>
|
||||
<script src="~/js/jquery-ui.js"></script>
|
||||
<script src="~/js/bootstrap.js"></script>
|
||||
<script src="~/js/site.js"></script>
|
||||
<script src="~/js/jquery.signalR-2.2.1.js"></script>
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
|
||||
</script>
|
||||
<script src="~/js/site.js"></script>
|
||||
<script src="~/js/jquery-ui.js"></script>
|
||||
<script src="~/js/jquery.signalR-2.2.1.js"></script>
|
||||
</environment>
|
||||
@RenderSection("header", required: false)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
@using Yavsc.Models.Billing;
|
||||
@using Yavsc.Models.Workflow;
|
||||
@using Yavsc.Models.Relationship
|
||||
@using Yavsc.Models.Drawing;
|
||||
|
||||
@using Yavsc.ViewModels.Account;
|
||||
@using Yavsc.ViewModels.Manage;
|
||||
|
|
@ -25,7 +26,6 @@
|
|||
@using Yavsc.ViewModels.Auth;
|
||||
@using Yavsc.ViewModels.Administration;
|
||||
@using Yavsc.ViewModels.Relationship;
|
||||
|
||||
|
||||
@inject IViewLocalizer LocString
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue