From 4c4d71e211071cb3d7dbcdd28a61f16ef6e18ee6 Mon Sep 17 00:00:00 2001 From: F TEMPEZ Date: Thu, 28 Mar 2024 15:37:18 +0100 Subject: [PATCH] Folder 1.03 icones de pliage --- module/folder/changes.md | 2 ++ module/folder/enum.json | 2 +- module/folder/folder.php | 2 +- module/folder/view/index/index.css | 40 +++++++++++++++++++++------ module/folder/view/index/index.js.php | 17 ++++++++++-- module/folder/view/index/index.php | 12 ++++++-- 6 files changed, 61 insertions(+), 14 deletions(-) diff --git a/module/folder/changes.md b/module/folder/changes.md index 3c06300c..e6c67f3e 100644 --- a/module/folder/changes.md +++ b/module/folder/changes.md @@ -1,3 +1,5 @@ +1.03 +- Boutons pour replier ou déplier les dossiers 1.02 - Options d'ouverture des fichiers : download ; lightbox ; _blank 1.01 diff --git a/module/folder/enum.json b/module/folder/enum.json index b6ca43c0..571e264c 100644 --- a/module/folder/enum.json +++ b/module/folder/enum.json @@ -1 +1 @@ -{"name":"folder","realName":"Partage de dossier","version":"1.01","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file +{"name":"folder","realName":"Partage de dossier","version":"1.02","update":"0.0","delete":true,"dataDirectory":""} \ No newline at end of file diff --git a/module/folder/folder.php b/module/folder/folder.php index 3e838328..0e349ba3 100644 --- a/module/folder/folder.php +++ b/module/folder/folder.php @@ -17,7 +17,7 @@ class folder extends common { - const VERSION = '1.02'; + const VERSION = '1.03'; const REALNAME = 'Partage de dossier'; const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json) diff --git a/module/folder/view/index/index.css b/module/folder/view/index/index.css index 4097eb19..38fcdfe9 100644 --- a/module/folder/view/index/index.css +++ b/module/folder/view/index/index.css @@ -97,13 +97,37 @@ ul.sub-items { } +/** +* Barre d'icônes +*/ + +/* Alignement à droite des éléments "Déplier" et "Replier" */ +.titleicons { + text-align: right; +} + +/* Style des icônes pour "Déplier" et "Replier" */ +.titleicons span { + cursor: pointer; +} + +.titlecontainer { + display: flex; /* Utilisation de Flexbox pour aligner les éléments sur la même ligne */ + justify-content: space-between; /* Pour séparer les éléments à l'extrémité de la ligne */ + align-items: center; /* Pour aligner verticalement les éléments */ +} + +.titletag, .titleicons { + + display: flex; /* Pour aligner le contenu horizontalement */ + align-items: center; /* Pour aligner verticalement le contenu */ +} +.titletag { + flex:5; +} +.titleicons { + flex: 1; +} + -/** les dossiers -#dirindex li.folder { - background-image: url("module/folder/view/index/icons/classic/folder.svg"); -}*/ -/** fichiers par défaut (mime non trouvé) -#dirindex li:not(.folder) { - background-image: url("module/folder/view/index/icons/classic/png.svg"); -} */ \ No newline at end of file diff --git a/module/folder/view/index/index.js.php b/module/folder/view/index/index.js.php index 106f4cbb..4b210790 100644 --- a/module/folder/view/index/index.js.php +++ b/module/folder/view/index/index.js.php @@ -1,11 +1,24 @@ -$(document).ready(function() { +$(document).ready(function () { // Gérer le clic sur les éléments avec la classe toggle - $('.toggle').click(function() { + $('.toggle').click(function () { // Trouver le prochain élément de type ul avec la classe sub-items var subItems = $(this).next('ul.sub-items'); // Toggle pour afficher ou cacher les sous-éléments subItems.slideToggle(); }); + + // Gérer le clic sur "Déplier" + $('#expand').click(function () { + // Afficher tous les sous-éléments + $('ul.sub-items').slideDown(); F + }); + + // Gérer le clic sur "Replier" + $('#collapse').click(function () { + // Cacher tous les sous-éléments + $('ul.sub-items').slideUp(); + }); + }); diff --git a/module/folder/view/index/index.php b/module/folder/view/index/index.php index cf4506dc..61c239b6 100644 --- a/module/folder/view/index/index.php +++ b/module/folder/view/index/index.php @@ -1,6 +1,14 @@
-

getData(['module', $this->getUrl(0), 'title']);?>

+
+
+

getData(['module', $this->getUrl(0), 'title']);?>

+
+
+ 'all'])?> + 'all'])?> +
+
-
\ No newline at end of file +