folder css okay
This commit is contained in:
parent
90a5a8a96a
commit
25d6192e0e
@ -17,8 +17,8 @@
|
|||||||
class folder extends common
|
class folder extends common
|
||||||
{
|
{
|
||||||
|
|
||||||
const VERSION = '4.2';
|
const VERSION = '0.1';
|
||||||
const REALNAME = 'Dossier';
|
const REALNAME = 'Partage de dossier';
|
||||||
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
|
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
|
||||||
|
|
||||||
public static $actions = [
|
public static $actions = [
|
||||||
@ -74,7 +74,7 @@ class folder extends common
|
|||||||
if (is_dir($chemin)) {
|
if (is_dir($chemin)) {
|
||||||
// Ouvrir le dossier
|
// Ouvrir le dossier
|
||||||
if ($dh = opendir($chemin)) {
|
if ($dh = opendir($chemin)) {
|
||||||
$items = isset($items) ? $items . '<ul>' : '<ul>';
|
$items = isset($items) ? $items . '<ul class="folder">' : '<ul class ="folder">';
|
||||||
//$items = '<ul>';
|
//$items = '<ul>';
|
||||||
// Parcourir les éléments du dossier
|
// Parcourir les éléments du dossier
|
||||||
while (($element = readdir($dh)) !== false) {
|
while (($element = readdir($dh)) !== false) {
|
||||||
@ -85,14 +85,14 @@ class folder extends common
|
|||||||
|
|
||||||
// Vérifier si c'est un dossier
|
// Vérifier si c'est un dossier
|
||||||
if (is_dir($cheminComplet)) {
|
if (is_dir($cheminComplet)) {
|
||||||
// Afficher le nom du dossier
|
// Afficher le nom du dossier avec un élément details
|
||||||
$items .= "<li>$element";
|
$items .= "<li class='directory'><details><summary>$element</summary>";
|
||||||
// Appeler récursivement la fonction pour ce sous-dossier
|
// Appeler récursivement la fonction pour ce sous-dossier
|
||||||
$items .= $this->listerSousDossier($cheminComplet);
|
$items .= $this->listerSousDossier($cheminComplet);
|
||||||
$items .= '</li>';
|
$items .= '</details></li>';
|
||||||
} else {
|
} else {
|
||||||
// Afficher le nom du fichier comme un lien
|
// Afficher le nom du fichier comme un lien
|
||||||
$items .= '<li><a href="' . $cheminComplet . '" target="_blank">' . $element . '</a></li>';
|
$items .= "<li class='file'><a href='$cheminComplet' target='_blank'>$element</a></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,11 +102,10 @@ class folder extends common
|
|||||||
closedir($dh);
|
closedir($dh);
|
||||||
}
|
}
|
||||||
return $items;
|
return $items;
|
||||||
} else {
|
}
|
||||||
exit('Erreur de chemin');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Liste les dossier contenus dans RFM
|
* Liste les dossier contenus dans RFM
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
#dirindex article,
|
#dirindex article{
|
||||||
#dirindex footer {
|
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 480px;
|
width: 480px;
|
||||||
@ -17,32 +16,25 @@
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dirindex article {
|
#dirindex details summary, #dirindex details summary::-webkit-details-marker {
|
||||||
background-color: #ffffff;
|
list-style: none;
|
||||||
border: #cccccc solid 1px;
|
cursor: pointer;
|
||||||
-moz-border-radius: 11px;
|
|
||||||
-webkit-border-radius: 11px;
|
|
||||||
border-radius: 11px;
|
|
||||||
padding: 0 1em;
|
|
||||||
}
|
|
||||||
#dirindex h1 {
|
|
||||||
font-size: 140%;
|
|
||||||
}
|
|
||||||
#dirindex ol {
|
|
||||||
line-height: 1.4em;
|
|
||||||
list-style-type: disc;
|
|
||||||
}
|
|
||||||
#dirindex li.directory a:before {
|
|
||||||
content: '[ ';
|
|
||||||
}
|
|
||||||
#dirindex li.directory a:after {
|
|
||||||
content: ' ]';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#dirindex footer {
|
#dirindex ul {
|
||||||
font-size: 70%;
|
list-style: none;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.directory {
|
||||||
|
background: url('data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1wcmVmaXg9ImZhcyIgZGF0YS1pY29uPSJmb2xkZXIiIGNsYXNzPSJzdmctaW5saW5lLS1mYSBmYS1mb2xkZXIgZmEtdy0xNiIgcm9sZT0iaW1nIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik00NjQgMTI4SDI3MmwtNjQtNjRINDhDMjEuNDkgNjQgMCA4NS40OSAwIDExMnYyODhjMCAyNi41MSAyMS40OSA0OCA0OCA0OGg0MTZjMjYuNTEgMCA0OC0yMS40OSA0OC00OFYxNzZjMC0yNi41MS0yMS40OS00OC00OC00OHoiPjwvcGF0aD48L3N2Zz4=') no-repeat left top;
|
||||||
|
height: 20px;
|
||||||
|
padding-top: 7px;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file{
|
||||||
|
background: url('data:image/svg+xml;base64,PHN2ZyBhcmlhLWhpZGRlbj0idHJ1ZSIgZm9jdXNhYmxlPSJmYWxzZSIgZGF0YS1wcmVmaXg9ImZhbCIgZGF0YS1pY29uPSJmaWxlIiByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDM4NCA1MTIiIGNsYXNzPSJzdmctaW5saW5lLS1mYSBmYS1maWxlIGZhLXctMTIgZmEtM3giPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTM2OS45IDk3LjlMMjg2IDE0QzI3NyA1IDI2NC44LS4xIDI1Mi4xLS4xSDQ4QzIxLjUgMCAwIDIxLjUgMCA0OHY0MTZjMCAyNi41IDIxLjUgNDggNDggNDhoMjg4YzI2LjUgMCA0OC0yMS41IDQ4LTQ4VjEzMS45YzAtMTIuNy01LjEtMjUtMTQuMS0zNHptLTIyLjYgMjIuN2MyLjEgMi4xIDMuNSA0LjYgNC4yIDcuNEgyNTZWMzIuNWMyLjguNyA1LjMgMi4xIDcuNCA0LjJsODMuOSA4My45ek0zMzYgNDgwSDQ4Yy04LjggMC0xNi03LjItMTYtMTZWNDhjMC04LjggNy4yLTE2IDE2LTE2aDE3NnYxMDRjMCAxMy4zIDEwLjcgMjQgMjQgMjRoMTA0djMwNGMwIDguOC03LjIgMTYtMTYgMTZ6IiBjbGFzcz0iIj48L3BhdGg+PC9zdmc+') no-repeat left top;
|
||||||
|
height: 20px;
|
||||||
|
padding-top: 7px;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user