Ajoute ou supprime des cercle aux posts

This commit is contained in:
2017-01-21 22:36:43 +01:00
parent 1268411e29
commit 4fb1c297d9
19 changed files with 199 additions and 67 deletions

View File

@ -150,14 +150,16 @@ editorcontenu.on('text-change',function(delta,source){
<label asp-for="Title" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Title" class="form-control" />
<span asp-validation-for="Title" class="text-danger" />
<span asp-validation-for="Title" class="text-danger" >
</span>
</div>
</div>
<div class="form-group">
<label asp-for="Photo" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Photo" class="form-control" />
<span asp-validation-for="Photo" class="text-danger" />
<span asp-validation-for="Photo" class="text-danger" >
</span>
</div>
</div>
<div class="form-group">
@ -165,7 +167,8 @@ editorcontenu.on('text-change',function(delta,source){
<div class="col-md-10">
<textarea asp-for="Content" class="form-control" >
</textarea>
<span asp-validation-for="Content" class="text-danger" />
<span asp-validation-for="Content" class="text-danger" >
</span>
</div>
</div>
<div class="form-group">
@ -177,8 +180,7 @@ editorcontenu.on('text-change',function(delta,source){
<div class="form-group">
<label asp-for="ACL" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="ACL" asp-items=@ViewBag.ACL multiple>
</select>
@await Component.InvokeAsync("CirclesControl",Model)
</div>
</div>

View File

@ -29,7 +29,7 @@
<h3>Salons</h3>
<ul><li id="pubChan">Public</li></ul>
<h3>Utilisateurs</h3>
<ul id="userlist" style="list-style:none; padding: 1em; margin:1em;sqc">
<ul id="userlist" style="list-style:none; padding: 1em; margin:1em;">
</ul>
</div>
@ -51,10 +51,6 @@
</div>
@section scripts {
<!--Script references. -->
<!--The jQuery library is required and is referenced by default in _Layout.cshtml. -->
<!--Reference the SignalR library. -->
<script src="~/js/jquery.signalR-2.2.1.min.js"></script>
<!--Reference the autogenerated SignalR hub script. -->
<script src="~/api/signalr/hubs"></script>
<!--SignalR script to update the chat page and send messages.-->
@ -172,12 +168,6 @@ $('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
}
}
};
@if (!ViewBag.IsAuthenticated) {
// Get the user name and store it to prepend to messages.
<text>
$('#displayname').val(prompt('Enter your name:', ''));
</text>
}
var sendMessage = function() {
@ -189,6 +179,13 @@ $('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
// Set initial focus to message input box.
$('#message').focus();
@if (!ViewBag.IsAuthenticated) {
// Get the user name and store it to prepend to messages.
<text>
$('#displayname').val(prompt('Enter your name:', ''));
</text>
}
// Start the connection.
$.connection.hub.start().done(function () {

View File

@ -0,0 +1,7 @@
@model CirclesViewModel
@foreach (var cb in ViewBag.Access) { 
<label><input type="checkbox" class="@(Model.TargetTypeName)cirle" checked="@cb.Checked" value="@cb.Text"
data-target-id="@Model.Target.Id" data-circle-id="@cb.Value" data-targe-type="">
@cb.Text </label>
}

View File

@ -1,16 +1,3 @@
@model Circle
<dl class="circle dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Owner)
</dt>
<dd>
@Html.DisplayFor(model => model.Owner)
</dd>
</dl>
<span class="circle"> @Model.Name </span>

View File

@ -15,8 +15,10 @@
</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>
</environment>
<environment names="Staging,Production,yavsc,yavscpre,booking,lua">
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js"

View File

@ -9,6 +9,7 @@
@using Yavsc;
@using Yavsc.Helpers;
@using Yavsc.Models;
@using Yavsc.Models.Access;
@using Yavsc.Models.Google;
@using Yavsc.Models.Booking;
@using Yavsc.Models.Market;
@ -19,6 +20,7 @@
@using Yavsc.ViewModels.Calendar;
@using Yavsc.ViewModels.Auth;
@using Yavsc.ViewModels.Administration;
@using Yavsc.ViewModels.Relationship;
@inject IViewLocalizer LocString
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"