Folder 1.02 simplifications
This commit is contained in:
parent
894dde1522
commit
95e1f738fb
|
@ -1,4 +1,6 @@
|
||||||
|
1.02
|
||||||
|
- Options d'ouverture des fichiers
|
||||||
1.01
|
1.01
|
||||||
- Affiche uniqument les images dans Lity, force le téléchargement des autres ressources. Une option est à prévoir dans la configuration.
|
- Affiche uniquement les images dans Lity, force le téléchargement des autres ressources. Une option est à prévoir dans la configuration.
|
||||||
1.0
|
1.0
|
||||||
- Version initiale publiée
|
- Version initiale publiée
|
|
@ -39,26 +39,25 @@ class folder extends common
|
||||||
'sqo' => 'Carré',
|
'sqo' => 'Carré',
|
||||||
'viv' => 'Vivid'
|
'viv' => 'Vivid'
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $iconSize = [
|
public static $iconSize = [
|
||||||
'md' => 'Standard',
|
'md' => 'Standard',
|
||||||
'lg' => 'Moyenne',
|
'lg' => 'Moyenne',
|
||||||
'xl' => 'Grande'
|
'xl' => 'Grande'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public static $openingTarget = [
|
||||||
|
'data-lity' => 'Images dans une lightbox (lity), sinon téléchargement',
|
||||||
|
'_blank' => 'Nouvel onglet',
|
||||||
|
'download' => 'Téléchargement forcé',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Configuration de l'affichage
|
|
||||||
$config['showsubfolder'] = $this->getData(['module', $this->getUrl(0), 'subfolder']);
|
|
||||||
$config['sort'] = $this->getData(['module', $this->getUrl(0), 'sort']);
|
|
||||||
$config['showdetails'] = $this->getData(['module', $this->getUrl(0), 'details']);
|
|
||||||
$config['initialfolderstate'] = $this->getData(['module', $this->getUrl(0), 'folderstate']);
|
|
||||||
$config['iconpack'] = $this->getData(['module', $this->getUrl(0), 'iconpack']);
|
|
||||||
$config['iconsize'] = $this->getData(['module', $this->getUrl(0), 'iconsize']);
|
|
||||||
|
|
||||||
// Générer l'affichage
|
// Générer l'affichage
|
||||||
self::$folders = $this->getFolderContent($this->getData(['module', $this->getUrl(0), 'path']), $config);
|
self::$folders = $this->getFolderContent($this->getData(['module', $this->getUrl(0), 'path']), $this->getData(['module', $this->getUrl(0)]));
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
@ -112,10 +111,10 @@ class folder extends common
|
||||||
|
|
||||||
private function getFolderContent($chemin, $config = [])
|
private function getFolderContent($chemin, $config = [])
|
||||||
{
|
{
|
||||||
$showSubFolder = isset($config['showsubfolder']) ? $config['showsubfolder'] : true;
|
$showSubFolder = isset($config['subfolder']) ? $config['subfolder'] : true;
|
||||||
$sort = isset($config['sort']) ? $config['sort'] : true;
|
$sort = isset($config['sort']) ? $config['sort'] : true;
|
||||||
$showDetails = isset($config['showdetails']) ? $config['showdetails'] : false;
|
$showDetails = isset($config['details']) ? $config['details'] : false;
|
||||||
$initialFolderState = isset($config['initialfolderstate']) ? $config['initialfolderstate'] : 'collapsed';
|
$initialFolderState = isset($config['folderstate']) ? $config['folderstate'] : 'collapsed';
|
||||||
$iconPack = isset($config['iconpack']) || !empty($config['iconpack']) ? $config['iconpack'] : 'classic';
|
$iconPack = isset($config['iconpack']) || !empty($config['iconpack']) ? $config['iconpack'] : 'classic';
|
||||||
$iconSize = isset($config['iconsize']) || !empty($config['iconsize']) ? $config['iconsize'] : 'md';
|
$iconSize = isset($config['iconsize']) || !empty($config['iconsize']) ? $config['iconsize'] : 'md';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue