From eb3e1eb8c8365d3b3d1d39f24314ba420255afc2 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 21 Apr 2025 20:36:10 +0200 Subject: page menu et chemin, partie1 --- public/js/main.js | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) (limited to 'public/js/main.js') diff --git a/public/js/main.js b/public/js/main.js index cb76ea8..fadcfa9 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -29,10 +29,17 @@ function copyInClipBoard(link){ alert('Cette adresse a été copiée dans le presse-papier:\n\n' + link); } +function toastNotify(message) { + var toast = document.getElementById('toast'); + toast.textContent = message; + toast.className = 'toast show'; + setTimeout(function(){ toast.className = toast.className.replace('show', ''); }, 3000); +} + // complète les fonctions dans tinymce.js function switchPositions(article_id, direction) { - const current_article = findParent(document.getElementById(article_id), 'article'); + const current_article = findParent(document.getElementById(article_id), 'article'); // l'id n'est pas sur la bonne balise var other_article; if(direction == 'down'){ @@ -195,4 +202,100 @@ function findParent(element, tag_name){ element = element.parentElement; } return null; +} + +/* page Menu et chemins */ +function moveOneLevelUp(){} +function moveOneLevelDown(){} + +function switchMenuPositions(page_id, direction) +{ + const nav_zone = document.getElementById("nav_zone"); // parent de