Add comments to PHP and JS files
Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Point d'entrée web : charge la configuration et le routeur principal.
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/../src/Core/config.php';
|
||||
require_once __DIR__ . '/../src/Core/routes.php';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
// Gestion de l'upload et suppression d'avatar côté client.
|
||||
$(window).ready(function() {
|
||||
$("#deleteavatar").click(function() {
|
||||
$("aside").removeClass("avatar").addClass("noavatar");
|
||||
@@ -27,6 +28,7 @@ $(window).ready(function() {
|
||||
});
|
||||
|
||||
|
||||
// Prévisualisation du fichier image dans le profil.
|
||||
function readURL(input) {
|
||||
if (input.files && input.files[0]) {
|
||||
var reader = new FileReader();
|
||||
@@ -37,4 +39,4 @@ function readURL(input) {
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
}
|
||||
}$
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// Compte à rebours du captcha.
|
||||
var time = 9;
|
||||
|
||||
// Active le bouton lorsque le délai est écoulé.
|
||||
$(window).ready(function() {
|
||||
var interval = setInterval(function() {
|
||||
if (time > 0) {
|
||||
@@ -19,4 +21,3 @@ $(window).ready(function() {
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Gestion des animations du header en scroll.
|
||||
var small = 2;
|
||||
|
||||
function reduce() {
|
||||
// Réduit la hauteur du header.
|
||||
$( "header" ).animate({
|
||||
height: "45px"
|
||||
}, 100, function() {
|
||||
@@ -36,6 +38,7 @@ function reduce() {
|
||||
}
|
||||
|
||||
function enlarge() {
|
||||
// Restaure la taille du header.
|
||||
$( "header" ).animate({
|
||||
height: "65px"
|
||||
}, 100, function() {
|
||||
@@ -70,6 +73,7 @@ function enlarge() {
|
||||
});
|
||||
}
|
||||
|
||||
// Déclenche les animations selon le scroll.
|
||||
$(window).scroll(function() {
|
||||
var position = $(window).scrollTop();
|
||||
if (position>80 && small!=1 && $('body').width() > 800) {
|
||||
@@ -82,6 +86,7 @@ $(window).scroll(function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Affichage du texte du logo au survol.
|
||||
$(window).ready(function() {
|
||||
$( "#logo" ).hover(
|
||||
function() {
|
||||
@@ -90,4 +95,4 @@ $(window).ready(function() {
|
||||
$("#kabanologotext").hide(100);
|
||||
}
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// Carte principale et marqueurs de POI.
|
||||
var mymap;
|
||||
var markers = [];
|
||||
|
||||
$( document ).ready(function() {
|
||||
// Differents layers for the map
|
||||
// Différentes couches pour la carte.
|
||||
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
||||
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
|
||||
// Base layers
|
||||
// Couches de base.
|
||||
var baseLayers = {
|
||||
"OpenStreetMap": topo_maptiler,
|
||||
"IGN France": ign
|
||||
@@ -63,6 +64,7 @@ $( document ).ready(function() {
|
||||
$("#map-credits").html(e.layer.getAttribution());
|
||||
});
|
||||
|
||||
// Ajuste la taille des icônes selon le niveau de zoom.
|
||||
mymap.on("zoomend", function () {
|
||||
var z = mymap.getZoom();
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Carte des POIs et marqueur principal.
|
||||
var mymap;
|
||||
var poi_layer;
|
||||
|
||||
@@ -5,7 +6,7 @@ $(document).ready(function() {
|
||||
// Mode : edit (formulaire) ou view (affichage)
|
||||
var isEdit = (typeof poi_mode === "undefined" || poi_mode === "edit");
|
||||
|
||||
// Differents layers for the map
|
||||
// Différentes couches pour la carte.
|
||||
var topo_maptiler = L.tileLayer(
|
||||
'https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi',
|
||||
{
|
||||
@@ -22,7 +23,7 @@ $(document).ready(function() {
|
||||
attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'
|
||||
}
|
||||
);
|
||||
// Base layers
|
||||
// Couches de base.
|
||||
var baseLayers = {
|
||||
"OpenStreetMap": topo_maptiler,
|
||||
"IGN France": ign
|
||||
@@ -80,6 +81,7 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
if (isEdit) {
|
||||
// Mise à jour des coordonnées à chaque déplacement.
|
||||
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'auto'}).openTooltip();
|
||||
}
|
||||
|
||||
@@ -96,6 +98,7 @@ $(document).ready(function() {
|
||||
$("#elevation_icon").show();
|
||||
});
|
||||
|
||||
// Si l'utilisateur modifie les champs lat/lon manuellement.
|
||||
$("#lat,#lon").change(function() { // If the user changes the lat/lon input values manualy
|
||||
if(isNaN($("#lat").val()) || isNaN($("#lon").val()) || $("#lat").val().length==0 || $("#lon").val()==null)
|
||||
$("#elevation_icon").hide();
|
||||
@@ -116,6 +119,7 @@ $(document).ready(function() {
|
||||
poi_layer.setIcon(editPoiIcon);
|
||||
});
|
||||
|
||||
// Chargement de l'altitude via le proxy.
|
||||
$("#elevation_icon").click(function(e) {
|
||||
$(this).find($(".fas")).removeClass('fa-search-location').addClass('fa-spinner').addClass('fa-spin');
|
||||
$.get(root+"poi/elevation_proxy", {location:$("#lat").val()+","+$("#lon").val()}, function(result){
|
||||
|
||||
Reference in New Issue
Block a user