ajout propriété déplacement externe
This commit is contained in:
@@ -109,6 +109,12 @@
|
||||
<label class="custom-control-label" for="astreinte">Astreinte</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="externaltrip">
|
||||
<label class="custom-control-label" for="externaltrip">Déplacement externe</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
@@ -181,6 +187,12 @@
|
||||
<label class="custom-control-label" for="apupdate">Evènement sur l'après-midi</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="externaltripupdate">
|
||||
<label class="custom-control-label" for="externaltripupdate">Déplacement externe</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="control-label">
|
||||
Description
|
||||
@@ -256,7 +268,7 @@ function eventRender(info) {
|
||||
content.attr("title",info.event.extendedProps.fulldescription);
|
||||
}
|
||||
|
||||
// Formulaire Création d'un évelement
|
||||
// Formulaire Création d'un événement
|
||||
var allDay;
|
||||
function eventSelect(selectionInfo) {
|
||||
var start=moment(selectionInfo.start);
|
||||
@@ -302,14 +314,15 @@ function eventSelect(selectionInfo) {
|
||||
$('#modalsubmit #end').val(end.format("YYYY-MM-DD"));
|
||||
|
||||
$('#modalsubmit #description').val("");
|
||||
|
||||
$('#modalsubmit #externaltrip').prop("checked",false);
|
||||
|
||||
$("#modalsubmit .alert").remove();
|
||||
|
||||
// Formulaire de création d'un évènement
|
||||
$('#modalsubmit').modal();
|
||||
}
|
||||
|
||||
// Formulaire Modification d'un évelement
|
||||
// Formulaire Modification d'un événement
|
||||
function eventClick(info) {
|
||||
if(info.event.extendedProps.editable) {
|
||||
console.log(info.event);
|
||||
@@ -322,7 +335,7 @@ function eventClick(info) {
|
||||
var eventallday = info.event.allDay;
|
||||
var eventstart = info.event.start;
|
||||
var eventend = info.event.end;
|
||||
|
||||
var externaltrip = info.event.extendedProps.externaltrip;
|
||||
$('#userupdate').val(userid).trigger("change");
|
||||
$('#taskupdate').val(taskid).trigger("change");
|
||||
$('#modalupdate #idevent').val(id);
|
||||
@@ -330,10 +343,11 @@ function eventClick(info) {
|
||||
$('#modalupdate #fgastreinte').val(fgastreinte);
|
||||
$('#modalupdate #description').val(description);
|
||||
|
||||
$('#modalupdate #externaltripupdate').prop("checked",externaltrip);
|
||||
|
||||
$("#modalupdate .alert").remove();
|
||||
eDayStart=eventstart.toString().split(" ")[2]
|
||||
eDayEnd=eventend.toString().split(" ")[2]
|
||||
console.log( eDayStart + " " + eDayEnd + " " + (eDayEnd - eDayStart))
|
||||
if ((eDayEnd - eDayStart) >1) {
|
||||
$('#modalupdate #amupdate').prop("checked",true);
|
||||
$('#modalupdate #apupdate').prop("checked",true);
|
||||
@@ -395,6 +409,7 @@ function eventSubmit() {
|
||||
am: $("#modalsubmit #amsubmit").prop("checked"),
|
||||
ap: $("#modalsubmit #apsubmit").prop("checked"),
|
||||
astreinte: $("#modalsubmit #astreinte").prop("checked"),
|
||||
externaltrip: $("#modalsubmit #externaltrip").prop("checked"),
|
||||
description: $("#modalsubmit #description").val()
|
||||
},
|
||||
url: "{{ path('app_event_submit') }}",
|
||||
@@ -426,6 +441,7 @@ function eventUpdate() {
|
||||
am: $("#modalupdate #amupdate").prop("checked"),
|
||||
ap: $("#modalupdate #apupdate").prop("checked"),
|
||||
fgastreinte: $("#modalupdate #fgastreinte").val(),
|
||||
externaltrip: $("#modalupdate #externaltripupdate").prop("checked"),
|
||||
description: $("#modalupdate #description").val()
|
||||
},
|
||||
url: "{{ path('app_event_update') }}",
|
||||
@@ -473,7 +489,6 @@ function eventDelete() {
|
||||
|
||||
// On change astreinte
|
||||
$("#astreinte").change(function() {
|
||||
console.log(allDay)
|
||||
if(this.checked) {
|
||||
$("#amsubmit").prop("disabled",true);
|
||||
$("#apsubmit").prop("disabled",true);
|
||||
|
Reference in New Issue
Block a user