valie
This commit is contained in:
parent
95b4d30605
commit
6c7d2f4be0
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Police.php';
|
||||
|
||||
class ControleurAjaxlisterpolicesclient extends Controleur {
|
||||
private $police;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->police = new Police();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$_SESSION['idPolice_C'] = '';
|
||||
$_SESSION['numeroPolice_C'] = '';
|
||||
$_SESSION['idPoliceAjax'] = '';
|
||||
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
$polices = $this->police->getPoliceRh();
|
||||
|
||||
$this->genererVueAjax(array('vue' => $vue, 'polices' => $polices));
|
||||
}
|
||||
}
|
||||
18
Controleur/ControleurAjaxsessionvue.php
Normal file
18
Controleur/ControleurAjaxsessionvue.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Police.php';
|
||||
|
||||
class ControleurAjaxsessionvue extends Controleur {
|
||||
private $police;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->police = new Police();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$vue = $this->requete->getParametreFormulaire("vue");
|
||||
$_SESSION['vueActive'] = $vue;
|
||||
}
|
||||
}
|
||||
24
Controleur/ControleurChoisirpolice.php
Normal file
24
Controleur/ControleurChoisirpolice.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
require_once 'Modele/Police.php';
|
||||
|
||||
class ControleurChoisirpolice extends Controleur {
|
||||
private $police;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue("Choisirpolice");
|
||||
|
||||
$this->police = new Police();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$vue = $_SESSION["vueActive"];
|
||||
$polices = $this->police->getPoliceRh();
|
||||
|
||||
$this->genererVue(array('vue' => $vue, 'polices' => $polices));
|
||||
}
|
||||
}
|
||||
|
|
@ -4535,6 +4535,7 @@ function consulterfactureged_pop()
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
function lister_polices_client(id) {
|
||||
const vues = {
|
||||
1: "Rechercherassure",
|
||||
|
|
@ -4542,17 +4543,37 @@ function lister_polices_client(id) {
|
|||
3: "Sppolice"
|
||||
};
|
||||
|
||||
$("#numeroPolice_C").val('');
|
||||
|
||||
vue = vues[id] || null; // null si id ne correspond à rien
|
||||
|
||||
if(vue != null){
|
||||
$.ajax({
|
||||
url: racine + "Ajaxsessionvue/",
|
||||
type: 'POST',
|
||||
data: { vue: vue },
|
||||
success: function (data) {
|
||||
|
||||
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
},
|
||||
complete: function()
|
||||
{
|
||||
window.location.assign($("#racineWeb" ).val()+"Choisirpolice/");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const modalEl = document.getElementById('pop_police');
|
||||
//const modalEl = document.getElementById('pop_police');
|
||||
|
||||
// On déplace le modal directement sous <body> s'il n'y est pas déjà.
|
||||
// Cela permet de passer outre les z-index des conteneurs parents (Sidebar, Header).
|
||||
if (modalEl.parentElement !== document.body) {
|
||||
|
||||
/*
|
||||
if (modalEl.parentElement !== document.body) {
|
||||
document.body.appendChild(modalEl);
|
||||
}
|
||||
*/
|
||||
|
||||
const racine = $("#racineWeb").val() || "/";
|
||||
const divPolice = document.getElementById('div_police');
|
||||
|
|
@ -4560,21 +4581,26 @@ function lister_polices_client(id) {
|
|||
/* ===================================================
|
||||
* Préparation visuelle (Spinner)
|
||||
* =================================================== */
|
||||
showLoader("#div_police", { size: 3 });
|
||||
|
||||
//showLoader("#div_police", { size: 3 });
|
||||
|
||||
|
||||
/* ===================================================
|
||||
* Initialisation de l'instance Bootstrap
|
||||
* =================================================== */
|
||||
|
||||
/*
|
||||
const modal = bootstrap.Modal.getOrCreateInstance(modalEl, {
|
||||
backdrop: 'static',
|
||||
keyboard: false
|
||||
});
|
||||
*/
|
||||
|
||||
/* ===================================================
|
||||
* Gestion de l'événement d'affichage et AJAX
|
||||
* =================================================== */
|
||||
// On utilise 'shown.bs.modal' pour lancer l'AJAX une fois le modal visible
|
||||
/*
|
||||
$(modalEl).one('shown.bs.modal', function () {
|
||||
$.ajax({
|
||||
url: racine + "Ajaxlisterpolicesclient/",
|
||||
|
|
@ -4593,13 +4619,14 @@ function lister_polices_client(id) {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
*/
|
||||
/* ===================================================
|
||||
* 6. Affichage final
|
||||
* =================================================== */
|
||||
modal.show();
|
||||
// modal.show();
|
||||
}
|
||||
|
||||
|
||||
function ajax_contexter_police(){
|
||||
idPolice = $("#idPolice").val();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<div id="div_police" class="p-3 bg-white rounded shadow-sm border">
|
||||
<div class="row g-3 align-items-end">
|
||||
<div class="col-md-7">
|
||||
|
|
@ -687,7 +687,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
|
|||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
<!-- Application Scripts -->
|
||||
<script src="/Js/fonctions.js?ver=2026.02.17.00"></script>
|
||||
<script src="/Js/fonctions.js?ver=2026.02.17.01"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
raffraichier_gabarit();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user