|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(li).append(newForm); |
|
|
$(li).append(newForm); |
|
|
$(li).find('#form_entities_' + index + '_id').val($(li).data('id')); |
|
|
$(li).find('#form_entities_' + index + '_id').val($(li).data('id')); |
|
|
if ($('.sov-sortable').data('parent-position') !== '') { |
|
|
|
|
|
|
|
|
/* if ($('.sov-sortable').data('parent-position') !== '') { |
|
|
//Ajout d'un 0 initial pour les nuémros <10 |
|
|
//Ajout d'un 0 initial pour les nuémros <10 |
|
|
indexAsString = index.toString().padStart(2, '0'); |
|
|
indexAsString = index.toString().padStart(2, '0'); |
|
|
val = $('.sov-sortable').data('parent-position') + '.' + indexAsString |
|
|
val = $('.sov-sortable').data('parent-position') + '.' + indexAsString |
|
|
} else { |
|
|
|
|
|
|
|
|
} else {*/ |
|
|
val = index; |
|
|
val = index; |
|
|
} |
|
|
|
|
|
|
|
|
//} |
|
|
$(li).find('#form_entities_' + index + '_position').val(val); |
|
|
$(li).find('#form_entities_' + index + '_position').val(val); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|