WIP: tout fonctionne meme le scroll il ne reste plus que ordreJFG
This commit is contained in:
@@ -184,3 +184,46 @@
|
|||||||
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
|
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
|
||||||
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
|
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************/
|
||||||
|
|
||||||
|
/* 1. On nettoie le body */
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden; /* Empêche le scroll de la page entière */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 2. On positionne le shell en absolu pour qu'il s'insère entre le header et le footer */
|
||||||
|
.ordregf-shell {
|
||||||
|
position: absolute;
|
||||||
|
top: 80px; /* Hauteur exacte de votre header */
|
||||||
|
bottom: 50px; /* Hauteur exacte de votre footer */
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px; /* Un léger espace intérieur pour l'esthétique */
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 3. La carte occupe l'espace restant */
|
||||||
|
.ordregf-card {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden; /* Important pour que le scroll ne sorte pas de la carte */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 4. C'est ici que le scroll se passe */
|
||||||
|
.ordregf-table-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto; /* Active le scroll uniquement ici */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Important : reset des marges du tableau qui pourraient le pousser */
|
||||||
|
.ordregf-table {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
require_once __DIR__ . '/db.php';
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
|
$db = (new App\Database\Database())->getConnection();
|
||||||
|
|
||||||
|
// Récupération des données POST
|
||||||
|
$id = $_POST['id'];
|
||||||
|
$nom = $_POST['nom'];
|
||||||
|
$ticker = $_POST['ticker'];
|
||||||
|
|
||||||
|
try {
|
||||||
|
$stmt = $db->prepare("UPDATE ordres SET nom = ?, ticker = ? WHERE id = ?");
|
||||||
|
$stmt->execute([$nom, $ticker, $id]);
|
||||||
|
|
||||||
|
echo json_encode(['success' => true]);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
|
||||||
|
}
|
||||||
@@ -38,7 +38,6 @@ $ordres = fetchOrdreGF($connection);
|
|||||||
|
|
||||||
require_once __DIR__ . '/header.php';
|
require_once __DIR__ . '/header.php';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<section class="ordregf-shell">
|
<section class="ordregf-shell">
|
||||||
<div class="ordregf-card">
|
<div class="ordregf-card">
|
||||||
<header class="ordregf-card-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;">
|
<header class="ordregf-card-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user