diff options
| author | polo <ordipolo@gmx.fr> | 2025-09-05 11:27:37 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-09-05 11:27:37 +0200 |
| commit | 46b455a0d3e96099e78975f53a25365a2ca9dcb4 (patch) | |
| tree | 54f4616a103410d2bc77827b738f592806dbff67 /public/js/new_page.js | |
| parent | f477314613beb26b0ce4c61ec0b1900df1de1cb1 (diff) | |
| download | cms-46b455a0d3e96099e78975f53a25365a2ca9dcb4.tar.gz cms-46b455a0d3e96099e78975f53a25365a2ca9dcb4.tar.bz2 cms-46b455a0d3e96099e78975f53a25365a2ca9dcb4.zip | |
classe Editor et encapsulation, placement article premier ou dernier, variable window.Config.page, séparation openEditor et initEditor
Diffstat (limited to 'public/js/new_page.js')
| -rw-r--r-- | public/js/new_page.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/public/js/new_page.js b/public/js/new_page.js index 5b1c5c5..4b49060 100644 --- a/public/js/new_page.js +++ b/public/js/new_page.js | |||
| @@ -2,10 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | // même fonction que dans modif_page.js | 3 | // même fonction que dans modif_page.js |
| 4 | function makePageNamePath(){ | 4 | function makePageNamePath(){ |
| 5 | const page_name = document.getElementById("page_name"); | 5 | document.getElementById("page_name_path").value = document.getElementById("page_name").value |
| 6 | const page_name_path = document.getElementById("page_name_path"); | ||
| 7 | |||
| 8 | page_name_path.value = page_name.value | ||
| 9 | .normalize("NFD") // décompose lettres + accents: é devient "e + accent aigu" | 6 | .normalize("NFD") // décompose lettres + accents: é devient "e + accent aigu" |
| 10 | .replace(/[\u0300-\u036f]/g, "") // supprime les accents | 7 | .replace(/[\u0300-\u036f]/g, "") // supprime les accents |
| 11 | .replace(/[^a-zA-Z0-9]+/g, " ") // supprime tout ce qu'il n'est pas alphanuméric | 8 | .replace(/[^a-zA-Z0-9]+/g, " ") // supprime tout ce qu'il n'est pas alphanuméric |
