refactoring
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Booking.Profiles;
|
||||
using Models.Musical.Profiles;
|
||||
|
||||
public class DjProfileApiController : ProfileApiController<DjSettings>
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.Musical;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.Musical;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
|
@ -24,14 +24,14 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
|
||||
// GET: Colors/Details/5
|
||||
public async Task<IActionResult> Details(byte? id)
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Color color = await _context.Color.SingleAsync(m => m.Red == id);
|
||||
Color color = await _context.Color.SingleAsync(m => m.Id == id);
|
||||
if (color == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
@ -61,14 +61,14 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
|
||||
// GET: Colors/Edit/5
|
||||
public async Task<IActionResult> Edit(byte? id)
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Color color = await _context.Color.SingleAsync(m => m.Red == id);
|
||||
Color color = await _context.Color.SingleAsync(m => m.Id == id);
|
||||
if (color == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
@ -92,14 +92,14 @@ namespace Yavsc.Controllers
|
||||
|
||||
// GET: Colors/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public async Task<IActionResult> Delete(byte? id)
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Color color = await _context.Color.SingleAsync(m => m.Red == id);
|
||||
Color color = await _context.Color.SingleAsync(m => m.Id == id);
|
||||
if (color == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
@ -111,9 +111,9 @@ namespace Yavsc.Controllers
|
||||
// POST: Colors/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(byte id)
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
Color color = await _context.Color.SingleAsync(m => m.Red == id);
|
||||
Color color = await _context.Color.SingleAsync(m => m.Id == id);
|
||||
_context.Color.Remove(color);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
|
@ -6,7 +6,7 @@ using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking.Profiles;
|
||||
using Yavsc.Models.Musical.Profiles;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNet.Mvc;
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Booking;
|
||||
using Models.Musical;
|
||||
public class InstrumentsController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
@ -4,7 +4,7 @@ using Microsoft.AspNet.Mvc;
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Booking;
|
||||
using Models.Musical;
|
||||
public class MusicalTendenciesController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
@ -17,7 +17,7 @@ namespace Yavsc.Models
|
||||
using YavscLib;
|
||||
using Auth;
|
||||
using Billing;
|
||||
using Booking;
|
||||
using Musical;
|
||||
using OAuth;
|
||||
using Workflow;
|
||||
using Identity;
|
||||
@ -25,7 +25,7 @@ namespace Yavsc.Models
|
||||
using Chat;
|
||||
using Messaging;
|
||||
using Access;
|
||||
using Booking.Profiles;
|
||||
using Musical.Profiles;
|
||||
using Workflow.Profiles;
|
||||
using Drawing;
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
|
@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
public class Instrument
|
||||
{
|
@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
public class InstrumentRating
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
|
||||
public class MusicalPreference {
|
@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
namespace Yavsc.Models.Booking {
|
||||
namespace Yavsc.Models.Musical {
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
public class DjPerformerProfile : SpecializationSettings
|
||||
{
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
{
|
||||
public class DjSettings : ISpecializationSettings
|
||||
{
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
{
|
||||
public class FormationPerformerProfile
|
||||
{
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
{
|
||||
public class GeneralSettings : ISpecializationSettings
|
||||
{
|
@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
{
|
||||
public class Instrumentation : ISpecializationSettings
|
||||
{
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
namespace Yavsc.Models.Musical
|
||||
{
|
||||
public class MusicianPerformerProfile : PerformerProfile
|
||||
{
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
namespace Yavsc.Models.Musical.Profiles
|
||||
{
|
||||
public class StarPerformerProfile : PerformerProfile
|
||||
{
|
@ -25,7 +25,6 @@
|
||||
<div class="col-md-10">
|
||||
@await Html.PartialAsync("ColorEditor",Model)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
@ -15,11 +15,13 @@
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model)
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
|
@ -14,13 +14,13 @@
|
||||
@Html.DisplayNameFor(model => model.Name)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Color)
|
||||
@Html.DisplayFor(model => model)
|
||||
@Html.DisplayFor(model => model.Name)
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</p>
|
||||
|
@ -21,6 +21,15 @@
|
||||
<span asp-validation-for="Name" class="text-danger" />
|
||||
</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>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Save" class="btn btn-default" />
|
||||
|
@ -24,9 +24,9 @@
|
||||
@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 */ })
|
||||
@Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
|
||||
@Html.ActionLink("Details", "Details", new {id = item.Id }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.Id })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
@ -18,8 +18,23 @@
|
||||
var green = @Model.Green;
|
||||
var blue = @Model.Blue;
|
||||
|
||||
$(".slider").slider(
|
||||
$("#sred").slider(
|
||||
{
|
||||
value: red,
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
});
|
||||
$("#sgreen").slider(
|
||||
{
|
||||
value: green,
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
});
|
||||
$("#sblue").slider(
|
||||
{
|
||||
value: blue,
|
||||
min: 0,
|
||||
max: 255,
|
||||
animate: "fast"
|
||||
@ -43,6 +58,7 @@
|
||||
blue=ui.value;
|
||||
updateColor();
|
||||
});
|
||||
updateColor();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
@ -18,7 +18,6 @@
|
||||
<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>
|
||||
</environment>
|
||||
<environment names="Staging,Production,yavsc,yavscpre,zicmoove,lua">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"
|
||||
@ -29,10 +28,10 @@
|
||||
asp-fallback-src="~/bower_components/bootstrap/dist/js/bootstrap.min.js"
|
||||
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>
|
||||
<script src="~/js/site.js"></script>
|
||||
</environment>
|
||||
<script src="~/js/jquery.signalR-2.2.1.js"></script>
|
||||
@RenderSection("header", required: false)
|
||||
</head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user