ajout possibilité de modifier la plage horaire d'un événement sur le calendrier
This commit is contained in:
@@ -157,7 +157,6 @@
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label required" for="taskupdate">
|
||||
Project<span class="mandatory">*</span>
|
||||
@@ -169,7 +168,19 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="amupdate">
|
||||
<label class="custom-control-label" for="amupdate">Evènement sur la matinée</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="apupdate">
|
||||
<label class="custom-control-label" for="apupdate">Evènement sur l'après-midi</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
Description
|
||||
@@ -301,22 +312,43 @@ function eventSelect(selectionInfo) {
|
||||
// Formulaire Modification d'un évelement
|
||||
function eventClick(info) {
|
||||
if(info.event.extendedProps.editable) {
|
||||
console.log(info.event.id);
|
||||
console.log(info.event);
|
||||
|
||||
var id=info.event.id;
|
||||
var description=info.event.extendedProps.description;
|
||||
var userid=info.event.extendedProps.userid;
|
||||
var taskid=info.event.extendedProps.taskid;
|
||||
var fgastreinte=info.event.extendedProps.astreinte;
|
||||
|
||||
var eventallday = info.event.allDay;
|
||||
var eventstart = info.event.start;
|
||||
//var eventend = info.event.end;
|
||||
|
||||
$('#userupdate').val(userid).trigger("change");
|
||||
$('#taskupdate').val(taskid).trigger("change");
|
||||
$('#modalupdate #idevent').val(id);
|
||||
|
||||
$('#modalupdate #fgastreinte').val(fgastreinte);
|
||||
$('#modalupdate #description').val(description);
|
||||
|
||||
$("#modalupdate .alert").remove();
|
||||
|
||||
|
||||
{# $('#modalupdate #amupdate').attr("disabled",eventallday);
|
||||
$('#modalupdate #apupdate').attr("disabled",eventallday); #}
|
||||
if (!eventallday){
|
||||
eStart = eventstart.toString().split(" ")[4].split(":")[0]
|
||||
//eEnd = eventend.toString().split(" ")[4].split(":")[0]
|
||||
if (eStart == 09){
|
||||
$('#modalupdate #amupdate').prop("checked",true);
|
||||
$('#modalupdate #apupdate').prop("checked",false);
|
||||
}
|
||||
if (eStart == 13){
|
||||
$('#modalupdate #amupdate').prop("checked",false);
|
||||
$('#modalupdate #apupdate').prop("checked",true);
|
||||
}
|
||||
}else{
|
||||
$('#modalupdate #amupdate').prop("checked",true);
|
||||
$('#modalupdate #apupdate').prop("checked",true);
|
||||
}
|
||||
// Formulaire de création d'un évènement
|
||||
$('#modalupdate').modal();
|
||||
}
|
||||
@@ -378,6 +410,8 @@ function eventUpdate() {
|
||||
idevent: $("#modalupdate #idevent").val(),
|
||||
iduser: $("#userupdate").val(),
|
||||
idtask: $("#taskupdate").val(),
|
||||
am: $("#modalupdate #amupdate").prop("checked"),
|
||||
ap: $("#modalupdate #apupdate").prop("checked"),
|
||||
fgastreinte: $("#modalupdate #fgastreinte").val(),
|
||||
description: $("#modalupdate #description").val()
|
||||
},
|
||||
|
Reference in New Issue
Block a user