diff --git a/Bootstrap_new/css/style_office.css b/Bootstrap_new/css/style_office.css index 5767707..e27887f 100644 --- a/Bootstrap_new/css/style_office.css +++ b/Bootstrap_new/css/style_office.css @@ -759,6 +759,11 @@ body { border-right: none !important; border-bottom: 1px solid var(--office-border); } + + .editor-paper { + padding: 1rem !important; + font-size: 9pt; + } } /* Écrans larges : mêmes insets pour nav-tabs et content-area */ @@ -952,7 +957,7 @@ li i { margin-right:10px; color:#007bff; } border-radius: 2px; /* Office style is more rectangular */ } -#div_police .card-header { +#div_police .card-header, #div_texte_cp .card-header { border-bottom: 1px solid var(--office-border) !important; background-color: white; color: var(--office-dark); @@ -1058,3 +1063,47 @@ li i { margin-right:10px; color:#007bff; } border-left: 3px solid var(--office-primary) !important; font-weight: bold; } + +/* Styles spécifiques à l'éditeur de texte CP */ + +/* Effet "Feuille de papier" pour le textarea */ +.editor-paper { + background-color: #ffffff !important; + background-image: + linear-gradient(#f1f1f1 1px, transparent 1px); + background-size: 100% 2.5rem; /* Simule des lignes d'écriture si besoin */ + line-height: 2.5rem; + padding: 2rem !important; + border: 1px solid var(--office-border) !important; + border-radius: 0; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; /* Police technique et lisible */ + color: var(--office-dark); + resize: vertical; + transition: all 0.3s ease; +} + +.editor-paper:focus { + outline: none; + box-shadow: 0 0 15px rgba(0,0,0,0.1) !important; + border-color: var(--office-secondary) !important; /* Focus bleu Office */ +} + +/* Bouton Enregistrer - Style Bleu Office */ +#div_texte_cp .btn-secondary { + background-color: var(--office-secondary) !important; + border-color: var(--office-secondary) !important; + border-radius: 2px; + transition: transform 0.2s; +} + +#div_texte_cp .btn-secondary:hover { + background-color: #1e4275 !important; + transform: translateY(-1px); +} + +/* Conteneur de l'éditeur */ +.editor-container { + background: white; + border-radius: 2px; + position: relative; +} diff --git a/Controleur/ControleurTextecp.php b/Controleur/ControleurTextecp.php new file mode 100644 index 0000000..b7c84d2 --- /dev/null +++ b/Controleur/ControleurTextecp.php @@ -0,0 +1,21 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue("Textecp"); + + $this->textecp = new Police(); + } + public function index() { + $idPolice = $_SESSION['idPolice_C']; + $textecp = $this->textecp->getTextecp($idPolice); + $this->genererVue(array('textecp' => $textecp)); + } + +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 63a6377..3d7f497 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -561,4 +561,9 @@ function afficher_emission(idEmission) { window.location.assign($("#racineWeb" ).val()+"Emission/"+idEmission+"/"); } -} \ No newline at end of file +} + +function texte_cp() +{ + window.location.assign($("#racineWeb" ).val()+"Textecp/"); +} diff --git a/Modele/Police.php b/Modele/Police.php index eefb8e7..a223e6e 100755 --- a/Modele/Police.php +++ b/Modele/Police.php @@ -110,4 +110,10 @@ class Police extends Modele { return $ligne['nb_non_facturees']; } + public function getTextecp($id) { + $sql = 'select texteCp from police where (id=?)'; + $textecp = $this->executerRequete($sql, array($id)); + return $textecp->fetch(PDO::FETCH_ASSOC); + } + } \ No newline at end of file diff --git a/Vue/Textecp/index.php b/Vue/Textecp/index.php new file mode 100644 index 0000000..20014bb --- /dev/null +++ b/Vue/Textecp/index.php @@ -0,0 +1,60 @@ +titre = "Tâches - Texte libre sur CP"; +$numeroPolice = $this->nettoyer($_SESSION['numeroPolice_C']); +?> + +
+ + = _("Ce texte apparaîtra sur les documents officiels de la police.") ?> +
+ + +