commit be11a47921156eb14343230cbb5b8bc69ae8ca08 Author: Fred Tempez Date: Fri Aug 16 15:57:50 2024 +0200 Init diff --git a/agenda/agenda.php b/agenda/agenda.php new file mode 100644 index 0000000..b625712 --- /dev/null +++ b/agenda/agenda.php @@ -0,0 +1,308 @@ + + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + +class agenda extends common +{ + + + const VERSION = '0.1'; + const REALNAME = 'Agenda'; + const DATA_DIRECTORY = self::DATA_DIR . 'agenda/'; + + const SORT_ASC = 'SORT_ASC'; + const SORT_DSC = 'SORT_DSC'; + const SORT_HAND = 'SORT_HAND'; + + + public static $agendas = []; + + public static $classes = ['' => '']; + + public static $actions = [ + 'config' => self::GROUP_EDITOR, + 'delete' => self::GROUP_EDITOR, + 'dirs' => self::GROUP_EDITOR, + 'add' => self::GROUP_EDITOR, + 'edit' => self::GROUP_EDITOR, + 'index' => self::GROUP_VISITOR + ]; + + + /** + * Mise à jour du module + * Appelée par les fonctions index et config + */ + private function update() + { + + //$versionData = $this->getData(['module', $this->getUrl(0), 'config', 'versionData']); + + } + + + /** + * Configuration + */ + public function config() + { + // Soumission du formulaire + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true + ) { + $agendas = $this->getData(['module', $this->getUrl(0), 'content']); + if (is_null($agendas)) { + $this->setData(['module', $this->getUrl(0), 'content', []]); + } elseif (!empty($agendas)) { + foreach ($agendas as $agendaId => $agendaData) { + self::$agendas[] = [ + $agendaData['eventName'], + helper::dateUTF8('%d %m %Y', $agendaData['date'], self::$i18nUI), + empty($agendaData['time']) ? '' : helper::dateUTF8('%H:%M', $agendaData['time'], self::$i18nUI), + template::button('agendaConfigEdit' . $agendaId, [ + 'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $agendaId, + 'value' => template::ico('pencil'), + 'help' => 'Configuration' + ]), + template::button('galleryConfigDelete' . $agendaId, [ + 'class' => 'galleryConfigDelete buttonRed', + 'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $agendaId, + 'value' => template::ico('trash'), + 'help' => 'Supprimer' + ]) + + ]; + } + } + } + + // Valeurs en sortie + $this->addOutput([ + 'showBarEditButton' => true, + 'title' => helper::translate('Configuration'), + 'view' => 'config' + ]); + } + + /** + * Ajout d'une événement + */ + public function add() + { + // Soumission du formulaire d'ajout d'une galerie + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && + $this->isPost() + ) { + + $this->setData([ + 'module', + $this->getUrl(0), + 'content', + uniqid(), + [ + 'eventName' => $this->getInput('agendaAddEventName', null, true), + 'date' => $this->getInput('agendaAddDate', helper::FILTER_DATETIME, true), + 'time' => $this->getInput('agendaAddAllDay', helper::FILTER_BOOLEAN) === false ? $this->getInput('agendaAddTime', helper::FILTER_DATETIME) : '', + 'className' => $this->getInput('agendaAddDateClassName', null), + 'dateColor' => $this->getInput('agendaAddDateColor', null), + ] + ]); + + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'notification' => helper::translate('Modifications enregistrées'), + 'state' => true + ]); + + } + // Liste des classes disponibles + $classes = $this->getData(['page', $this->getUrl(0), 'css']); + preg_match_all('/\.(\w+)/', $classes, $matches); + if (isset($matches[1])) { + // Créer un tableau associatif avec les clés égales aux valeurs + $associativeClasses = array_combine($matches[1], $matches[1]); + + // Fusionner ce tableau avec le tableau self::$classes + self::$classes = array_merge(self::$classes, $associativeClasses); + } + + // Valeurs en sortie + $this->addOutput([ + 'title' => helper::translate('Nouvel événement'), + 'view' => 'add', + 'vendor' => [ + 'tinycolorpicker' + ], + ]); + + } + + /** + * Ajout d'une événement + */ + public function edit() + { + // Soumission du formulaire d'ajout d'une galerie + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && + $this->isPost() + ) { + + $this->setData([ + 'module', + $this->getUrl(0), + 'content', + $this->getUrl(2), + [ + 'eventName' => $this->getInput('agendaEditEventName', null, true), + 'date' => $this->getInput('agendaEditDate', helper::FILTER_DATETIME, true), + 'time' => $this->getInput('agendaEditAllDay', helper::FILTER_BOOLEAN) === false ? $this->getInput('agendaEditTime', helper::FILTER_DATETIME) : '', + 'className' => $this->getInput('agendaEditDateClassName', null), + 'dateColor' => $this->getInput('agendaEditDateColor', null), + ] + ]); + + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'notification' => helper::translate('Modifications enregistrées'), + 'state' => true + ]); + + } + // Liste des classes disponibles + $classes = $this->getData(['page', $this->getUrl(0), 'css']); + preg_match_all('/\.(\w+)/', $classes, $matches); + if (isset($matches[1])) { + // Créer un tableau associatif avec les clés égales aux valeurs + $associativeClasses = array_combine($matches[1], $matches[1]); + + // Fusionner ce tableau avec le tableau self::$classes + self::$classes = array_merge(self::$classes, $associativeClasses); + } + // Valeurs en sortie + $this->addOutput([ + 'title' => helper::translate('Edition'), + 'view' => 'edit', + 'vendor' => [ + 'tinycolorpicker' + ], + ]); + } + + /** + * Suppression + */ + public function delete() + { + // La galerie n'existe pas + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) !== true || + $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]) === null + ) { + // Valeurs en sortie + $this->addOutput([ + 'access' => false + ]); + } + // Suppression + else { + $this->deleteData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]); + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'notification' => helper::translate('Evenement effacé'), + 'state' => true + ]); + } + } + + + /** + * Accueil (deux affichages en un pour éviter une url à rallonge) + */ + public function index() + { + + // Mise à jour des données de module + $this->update(); + + $agendas = $this->getData(['module', $this->getUrl(0), 'content']); + + // Initialise la feuille de style + if (empty($this->getData(['page', $this->getUrl(0), 'css']))) { + $this->initCss(); + } + + // Affichage du template si les données sont disponibles + if (is_null($agendas)) { + $this->setData(['module', $this->getUrl(0), 'content', []]); + } elseif (!empty($agendas)) { + // Lecture des données + foreach ($agendas as $agendasId => $data) { + // Convertion du timestamp en ISO + $data['date'] = helper::dateUTF8('%Y-%m-%d', $data['date']); + // Ajouter l'horaire + if (!empty($data['time'])) { + $data['time'] = helper::dateUTF8('%H:%M', $data['time']); + $data['date'] = $data['date'] . 'T' . $data['time']; + } + + self::$agendas[] = $data; + } + } + // Valeurs en sortie + $this->addOutput([ + 'showBarEditButton' => true, + 'showPageContent' => true, + 'view' => 'index', + 'vendor' => [ + 'animated-calendar' + ], + ]); + } + + // Page de module vide + private function initCss() + { + // Feuille de styles + $cssContent = + '.textRed { + padding: 2px; + border-radius: 5px; + color: red; + background-color: lightgrey; + font-size: 18px; + } + .textGreen { + border-radius: 5px; + padding: 2px; + color: lightgreen; + background-color: darkgrey; + font-size: 18px; + } + .textOrange { + padding: 2px; + border-radius: 5px; + color: orange; + background-color: green; + font-size: 18px; + }'; + $this->setData(['page', $this->getUrl(0), 'css', $cssContent]); + } + +} diff --git a/agenda/changes.md b/agenda/changes.md new file mode 100644 index 0000000..87c37ef --- /dev/null +++ b/agenda/changes.md @@ -0,0 +1,2 @@ +# Version 0.1 +- GeoGallery est basé sur le module gallery 4.1 \ No newline at end of file diff --git a/agenda/enum.json b/agenda/enum.json new file mode 100644 index 0000000..92bb663 --- /dev/null +++ b/agenda/enum.json @@ -0,0 +1 @@ +{"name":"geolocation","realName":"Géolocalisation","version":"0.5","update":"0.0","delete":true,"dataDirectory":"site\/data\/geolocation\/"} \ No newline at end of file diff --git a/agenda/i18n/de.json b/agenda/i18n/de.json new file mode 100644 index 0000000..9291146 --- /dev/null +++ b/agenda/i18n/de.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Zeigen Sie den Inhalt der Seite mit der Galerie an", + "Alignement du bouton de retour": "Return -Taste -Ausrichtung", + "Alphabétique ": "Alphabetisch", + "Alphabétique inverse": "Alphabetik umgekehrt", + "Au-dessus": "Über", + "Aucune galerie": "Keine Galerie", + "Bordure": "Bordüre", + "Configuration de la galerie %s ": "Galeriekonfiguration %s", + "Configuration des galeries": "Die Konfiguration der Galer", + "Couleur de la bordure": "Randfarbe", + "Couverture": "Decke", + "Discrète": "Diskret", + "Distribué avec marges": "Verteilt", + "Distribué sans marge": "Ohne Rand verteilt", + "Dossier cible": "Zieldatei", + "En dessous": "Unter", + "Epaisse": "Dick", + "Fine": "Bußgeld", + "Forte": "Stärke", + "Galerie ajoutée": "Galerie hinzugefügt", + "Galerie effacée": "Gelobte Galerie", + "Légende": "Legende", + "Légendes": "Legenden", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "Maske", + "Mode plein écran automatique": "Automatischer Vollmodus", + "Opacité au survol": "Opazität im Überflug", + "Options de configuration": "Optionen de Konfiguration", + "Proportionnelle": "Proportional", + "Supprimer cette galerie ?": "Diese Galerie entfernen?", + "Tri des images": "Bilder sortieren", + "Très Discrète": "Sehr diskret", + "Très fine": "Sehr gut", + "Très forte": "Sehr stark", + "Très épaisse": "Sehr dick", + "Vignettes": "Vignetten", + "Ajouter une galerie": "Eine Galerie hinzufügen", + "Éditer une galerie": "Eine Galerie bearbeiten", + "Effacer une galerie": "Eine Galerie löschen", + "Options des galeries": "Galerieoptionen", + "Thème des galeries": "Galeriethemen" +} \ No newline at end of file diff --git a/agenda/i18n/en_EN.json b/agenda/i18n/en_EN.json new file mode 100644 index 0000000..fe98265 --- /dev/null +++ b/agenda/i18n/en_EN.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Show the content of the page with the gallery", + "Alignement du bouton de retour": "Return button alignment", + "Alphabétique ": "Alphabetical", + "Alphabétique inverse": "Reverse alphabetics", + "Au-dessus": "Above", + "Aucune galerie": "No gallery", + "Bordure": "Border", + "Configuration de la galerie %s ": "Gallery settings %s ", + "Configuration des galeries": "Galleries's settings", + "Couleur de la bordure": "Border color", + "Couverture": "Cover", + "Discrète": "Discreet", + "Distribué avec marges": "Distributed with margins", + "Distribué sans marge": "Distributed without margin", + "Dossier cible": "Target file", + "En dessous": "Below", + "Epaisse": "Thick", + "Fine": "Fine", + "Forte": "Forte", + "Galerie ajoutée": "Gallery added", + "Galerie effacée": "Erased gallery", + "Légende": "Caption", + "Légendes": "Legends", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "Mask", + "Mode plein écran automatique": "Automatic full mode", + "Opacité au survol": "Opacity in overflight", + "Options de configuration": "Configuration options", + "Proportionnelle": "Proportional", + "Supprimer cette galerie ?": "Remove this gallery?", + "Tri des images": "Sorting images", + "Très Discrète": "Very discreet", + "Très fine": "Very fine", + "Très forte": "Very strong", + "Très épaisse": "Very thick", + "Vignettes": "Vignettes", + "Ajouter une galerie": "Add a gallery", + "Éditer une galerie": "Edit a gallery", + "Effacer une galerie": "Delete a gallery", + "Options des galeries": "Gallery options", + "Thème des galeries": "Gallery themes" +} \ No newline at end of file diff --git a/agenda/i18n/es.json b/agenda/i18n/es.json new file mode 100644 index 0000000..84c7aa4 --- /dev/null +++ b/agenda/i18n/es.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Mostrar contenido de página con galería", + "Alignement du bouton de retour": "Alineación del botón Atrás", + "Alphabétique ": "Alfabético", + "Alphabétique inverse": "Alfabético inverso", + "Au-dessus": "Encima", + "Aucune galerie": "Sin galería", + "Bordure": "Bordillo", + "Configuration de la galerie %s ": "Configuración de la galería %s ", + "Configuration des galeries": "Configuración de la galería", + "Couleur de la bordure": "Color del bordillo", + "Couverture": "Portada ", + "Discrète": "Discreto", + "Distribué avec marges": "Distribuido con márgenes", + "Distribué sans marge": "Distribuido sin margen", + "Dossier cible": "Carpeta de destino", + "En dessous": "Debajo", + "Epaisse": "grueso", + "Fine": "Fino", + "Forte": "Fuerte", + "Galerie ajoutée": "Galería añadida", + "Galerie effacée": "Galería eliminada", + "Légende": "Pie", + "Légendes": "Leyendas", + "Manuel": "Manual", + "Marge": "Margen", + "Masqué": "Máscara", + "Mode plein écran automatique": "Modo automático de pantalla completa", + "Opacité au survol": "Opacidad de desplazamiento", + "Options de configuration": "Opciones de configuración", + "Proportionnelle": "Proporcional", + "Supprimer cette galerie ?": "¿Borrar esta galería?", + "Tri des images": "Ordenar imágenes", + "Très Discrète": "Muy discreto", + "Très fine": "Muy fino", + "Très forte": "Muy fuerte", + "Très épaisse": "Muy grueso", + "Vignettes": "Viñetas", + "Ajouter une galerie": "Agregar una galería", + "Éditer une galerie": "Editar una galería", + "Effacer une galerie": "Borrar una galería", + "Options des galeries": "Opciones de galerías", + "Thème des galeries": "Temas de galerías" +} \ No newline at end of file diff --git a/agenda/i18n/fr_FR.json b/agenda/i18n/fr_FR.json new file mode 100644 index 0000000..bfc0e0f --- /dev/null +++ b/agenda/i18n/fr_FR.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "", + "Alignement du bouton de retour": "", + "Alphabétique ": "", + "Alphabétique inverse": "", + "Au-dessus": "", + "Aucune galerie": "", + "Bordure": "", + "Configuration de la galerie %s ": "", + "Configuration des galeries": "", + "Couleur de la bordure": "", + "Couverture": "", + "Discrète": "", + "Distribué avec marges": "", + "Distribué sans marge": "", + "Dossier cible": "", + "En dessous": "", + "Epaisse": "", + "Fine": "", + "Forte": "", + "Galerie ajoutée": "", + "Galerie effacée": "", + "Légende": "", + "Légendes": "", + "Manuel": "", + "Marge": "", + "Masqué": "", + "Mode plein écran automatique": "", + "Opacité au survol": "", + "Options de configuration": "", + "Proportionnelle": "", + "Supprimer cette galerie ?": "", + "Tri des images": "", + "Très Discrète": "", + "Très fine": "", + "Très forte": "", + "Très épaisse": "", + "Vignettes": "", + "Ajouter une galerie": "", + "Éditer une galerie": "", + "Effacer une galerie": "", + "Options des galeries": "", + "Thème des galeries": "" +} \ No newline at end of file diff --git a/agenda/i18n/gr_GR.json b/agenda/i18n/gr_GR.json new file mode 100644 index 0000000..0769106 --- /dev/null +++ b/agenda/i18n/gr_GR.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Εμφάνιση περιεχομένου σελίδας με γκαλερί", + "Alignement du bouton de retour": "Ευθυγράμμιση κουμπιού πίσω", + "Alphabétique ": "Αλφαβητική Ταξινόμηση", + "Alphabétique inverse": "Αντίστροφη αλφαβητική", + "Au-dessus": "Πάνω", + "Aucune galerie": "Δεν υπάρχει συλλογή εικόνων", + "Bordure": "κάδρο γύρω", + "Configuration de la galerie %s ": "Διαμόρφωση της γκαλερί %s ", + "Configuration des galeries": "Διαμόρφωση γκαλερί", + "Couleur de la bordure": "Χρώμα γραμμής", + "Couverture": "Κάλυψη ", + "Discrète": "διακριτικό", + "Distribué avec marges": "Διανομή με περιθώρια", + "Distribué sans marge": "Διανομή χωρίς περιθώριο", + "Dossier cible": "Φάκελος στόχος", + "En dessous": "Κάτω", + "Epaisse": "Παχιά γραμμή", + "Fine": "Λεπτή γραμμή ", + "Forte": "Ισχυρή αδιαφάνεια", + "Galerie ajoutée": "Προστέθηκε γκαλερί", + "Galerie effacée": "Γκαλερί διαγράφηκε", + "Légende": "Λεζάντα εικόνας", + "Légendes": "", + "Manuel": "Χειροκίνητη ", + "Marge": "Περιθώριο", + "Masqué": "κρυμμένο", + "Mode plein écran automatique": "Αυτόματη λειτουργία πλήρους οθόνης", + "Opacité au survol": "Αδιαφάνεια στο mouse-over", + "Options de configuration": "Επιλογές διαμόρφωσης", + "Proportionnelle": "Αναλογική", + "Supprimer cette galerie ?": "", + "Tri des images": "Ταξινόμηση εικόνων", + "Très Discrète": "Πολύ διακριτικό", + "Très fine": "Πολύ λεπτή γραμμή ", + "Très forte": "Πολύ Ισχυρή αδιαφάνεια", + "Très épaisse": "πολύ παχιά γραμμή", + "Vignettes": "", + "Ajouter une galerie": "Προσθήκη συλλογής", + "Éditer une galerie": "Επεξεργασία συλλογής", + "Effacer une galerie": "Διαγραφή συλλογής", + "Options des galeries": "Επιλογές συλλογών", + "Thème des galeries": "Θέματα συλλογών" +} \ No newline at end of file diff --git a/agenda/i18n/it.json b/agenda/i18n/it.json new file mode 100644 index 0000000..d3f948f --- /dev/null +++ b/agenda/i18n/it.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Mostra il contenuto della pagina con la galleria", + "Alignement du bouton de retour": "Allineamento del pulsante di ritorno", + "Alphabétique ": "Alfabetico", + "Alphabétique inverse": "Alfabetico inverso", + "Au-dessus": "Al di sopra", + "Aucune galerie": "Nessuna galleria", + "Bordure": "Bordo", + "Configuration de la galerie %s ": "Configurazione della galleria %s ", + "Configuration des galeries": "Configurazione di Galler", + "Couleur de la bordure": "Colore del bordo", + "Couverture": "Copertina", + "Discrète": "Discreto", + "Distribué avec marges": "Distribuito con margini", + "Distribué sans marge": "Distribuito senza margine", + "Dossier cible": "File di destinazione", + "En dessous": "Qui di seguito", + "Epaisse": "Spesso", + "Fine": "Bene", + "Forte": "Forte", + "Galerie ajoutée": "Galleria aggiunta", + "Galerie effacée": "Galleria cancellata", + "Légende": "Didascalia", + "Légendes": "Leggende", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "Maschera", + "Mode plein écran automatique": "Modalità completa automatica", + "Opacité au survol": "Opacità in luce eccessiva", + "Options de configuration": "Opzioni di configurazione", + "Proportionnelle": "Proporzionale", + "Supprimer cette galerie ?": "Rimuovere questa galleria?", + "Tri des images": "Ordinamento delle immagini", + "Très Discrète": "Molto discreto", + "Très fine": "Molto bene", + "Très forte": "Molto forte", + "Très épaisse": "Molto spesso", + "Vignettes": "Vignette", + "Ajouter une galerie": "Aggiungi una galleria", + "Éditer une galerie": "Modifica una galleria", + "Effacer une galerie": "Cancella una galleria", + "Options des galeries": "Opzioni delle gallerie", + "Thème des galeries": "Temi delle gallerie" +} \ No newline at end of file diff --git a/agenda/i18n/pt_PT.json b/agenda/i18n/pt_PT.json new file mode 100644 index 0000000..3c5ead3 --- /dev/null +++ b/agenda/i18n/pt_PT.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Mostre o conteúdo da página com a galeria", + "Alignement du bouton de retour": "Retornar alinhamento do botão", + "Alphabétique ": "Alfabético", + "Alphabétique inverse": "Alfabético reverso", + "Au-dessus": "Acima de", + "Aucune galerie": "Sem galeria", + "Bordure": "Fronteira", + "Configuration de la galerie %s ": "Configuração da galeria %s ", + "Configuration des galeries": "Configuração de Galler", + "Couleur de la bordure": "Cor da borda", + "Couverture": "Capa", + "Discrète": "Discreto", + "Distribué avec marges": "Distribuído com margens", + "Distribué sans marge": "Distribuído sem margem", + "Dossier cible": "Arquivo de destino", + "En dessous": "Abaixo de", + "Epaisse": "Espesso", + "Fine": "Multar", + "Forte": "Forte", + "Galerie ajoutée": "Galeria adicionada", + "Galerie effacée": "Galeria apagada", + "Légende": "Legenda", + "Légendes": "Legendas", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "mascarar", + "Mode plein écran automatique": "Modo completo automático", + "Opacité au survol": "Opacidade em Overflight", + "Options de configuration": "", + "Proportionnelle": "Proporcional", + "Supprimer cette galerie ?": "Remover esta galeria?", + "Tri des images": "Classificando imagens", + "Très Discrète": "Muito discreto", + "Très fine": "Muito bem", + "Très forte": "Muito forte", + "Très épaisse": "Muito espesso", + "Vignettes": "Vinhetas", + "Ajouter une galerie": "Adicionar uma galeria", + "Éditer une galerie": "Editar uma galeria", + "Effacer une galerie": "Apagar uma galeria", + "Options des galeries": "Opções de galerias", + "Thème des galeries": "Temas de galerias" +} \ No newline at end of file diff --git a/agenda/i18n/tr_TR.json b/agenda/i18n/tr_TR.json new file mode 100644 index 0000000..3af9e05 --- /dev/null +++ b/agenda/i18n/tr_TR.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Sayfa içeriğini galeri ile görüntüle", + "Alignement du bouton de retour": "Geri düğmesi hizalaması", + "Alphabétique ": "Alfabetik", + "Alphabétique inverse": "Ters alfabetik", + "Au-dessus": "Üstünde", + "Aucune galerie": "Galeri Yok", + "Bordure": "Çerçeve", + "Configuration de la galerie %s ": "%s galeri yapılandırması", + "Configuration des galeries": "Galerilerin yapılandırması", + "Couleur de la bordure": "Çerçeve rengi", + "Couverture": "Kapak", + "Discrète": "Silik", + "Distribué avec marges": "Kenar boşluklarıyla dağıtıldı", + "Distribué sans marge": "Marjsız dağıtıldı", + "Dossier cible": "Hedef klasör", + "En dessous": "Altında", + "Epaisse": "Kalın", + "Fine": "İnce", + "Forte": "Güçlü", + "Galerie ajoutée": "Galeri eklendi", + "Galerie effacée": "Galeri silindi", + "Légende": "Başlık", + "Légendes": "Başlıklar", + "Manuel": "Manuel", + "Marge": "Kenar boşluğu", + "Masqué": "Gizli", + "Mode plein écran automatique": "Otomatik tam ekran modu", + "Opacité au survol": "Hover opaklığı", + "Options de configuration": "Yapılandırma seçenekleri", + "Proportionnelle": "Orantılı", + "Supprimer cette galerie ?": "Bu galeri silinsin mi?", + "Tri des images": "Resimleri sıralama", + "Très Discrète": "Çok silik", + "Très fine": "Çok ince", + "Très forte": "Çok güçlü", + "Très épaisse": "Çok kalın", + "Vignettes": "Küçük resim", + "Ajouter une galerie": "Galeri Ekle", + "Éditer une galerie": "Galeri Düzenle", + "Effacer une galerie": "Galeri Sil", + "Options des galeries": "Galeri Seçenekleri", + "Thème des galeries": "Galeri Temaları" +} \ No newline at end of file diff --git a/agenda/profil/main/add.inc.php b/agenda/profil/main/add.inc.php new file mode 100644 index 0000000..6d865e9 --- /dev/null +++ b/agenda/profil/main/add.inc.php @@ -0,0 +1,12 @@ + $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN), + 'option' => $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN), + 'theme' => $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN), + 'config' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN) +]; \ No newline at end of file diff --git a/agenda/profil/main/edit.inc.php b/agenda/profil/main/edit.inc.php new file mode 100644 index 0000000..0a94afe --- /dev/null +++ b/agenda/profil/main/edit.inc.php @@ -0,0 +1,12 @@ + $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN), + 'option' => $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN), + 'theme' => $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN), + 'config' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN) +]; \ No newline at end of file diff --git a/agenda/profil/view/add.inc.php b/agenda/profil/view/add.inc.php new file mode 100644 index 0000000..7963bfe --- /dev/null +++ b/agenda/profil/view/add.inc.php @@ -0,0 +1,28 @@ +
+
+
+

+ +

+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/agenda/profil/view/edit.inc.php b/agenda/profil/view/edit.inc.php new file mode 100644 index 0000000..995c1b4 --- /dev/null +++ b/agenda/profil/view/edit.inc.php @@ -0,0 +1,38 @@ +
+
+
+

+ +

+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'add']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'edit']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'delete']) + ]); ?> +
+
+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'option']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'theme']) + ]); ?> +
+
+
+
+
\ No newline at end of file diff --git a/agenda/ressource/defaultdata.php b/agenda/ressource/defaultdata.php new file mode 100644 index 0000000..b0fb159 --- /dev/null +++ b/agenda/ressource/defaultdata.php @@ -0,0 +1,25 @@ + 'center', + 'thumbWidth' => '18em', + 'thumbHeight' => '15em', + 'thumbMargin' => '.5em', + 'thumbBorder' => '.1em', + 'thumbOpacity' => '.7', + 'thumbBorderColor' => 'rgba(221, 221, 221, 1)', + 'thumbRadius' => '.3em', + 'thumbShadows' => '1px 1px 10px', + 'thumbShadowsColor' => 'rgba(125, 125, 125, 1)', + 'legendHeight' => '.375em', + 'legendAlign' => 'center', + 'legendTextColor' => 'rgba(255, 255, 255, 1)', + 'legendBgColor' => 'rgba(0, 0, 0, .6)' + ]; + public static $defaultData = [ + "showUniqueGallery" => false, + "backPosition" => "top", + "backAlign" => "center", + 'versionData' => '3.0' + ]; +} diff --git a/agenda/ressource/theme.css b/agenda/ressource/theme.css new file mode 100644 index 0000000..c0608f9 --- /dev/null +++ b/agenda/ressource/theme.css @@ -0,0 +1,52 @@ +.galleryPicture, +.galleryGalleryPicture { + display: block; + border: var(--thumbBorder) solid var(--thumbBorderColor); + height: var(--thumbHeight); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + position: relative; + -webkit-transition: opacity .3s ease-out; + transition: opacity .3s ease-out; + border-radius: var(--thumbRadius); + box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); +} +.galleryPicture:hover, +.galleryGalleryPicture:hover { + opacity: var(--thumbOpacity); +} +.galleryName, +.galleryGalleryName { + position: absolute; + left: 0; + right: 0; + bottom: 0; + border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2); + padding: var(--legendHeight); + background: var(--legendBgColor); + color: var(--legendTextColor); + text-align: var(--legendAlign); +} + +.galleryRow { + display: flex; + flex-wrap: wrap; + justify-content: var(--thumbAlign); +} + +.colPicture { + width : var(--thumbWidth); + max-width: 50%; + padding: var(--thumbMargin); + } + + @media (max-width: 432px) { + .colPicture { + width: 90%; + max-width: 90%; + margin: 0.5em; + } + } \ No newline at end of file diff --git a/agenda/ressource/vartheme.css b/agenda/ressource/vartheme.css new file mode 100644 index 0000000..bd665d4 --- /dev/null +++ b/agenda/ressource/vartheme.css @@ -0,0 +1,27 @@ +.galleryRow { + --thumbAlign: #thumbAlign#; +} +.colPicture { + --thumbWidth: #thumbWidth#; + --thumbMargin: #thumbMargin#; +} +.galleryPicture, +.galleryGalleryPicture { + --thumbHeight: #thumbHeight#; + --thumbBorder: #thumbBorder#; + --thumbBorderColor: #thumbBorderColor#; + --thumbRadius: #thumbRadius#; + --thumbShadows: #thumbShadows#; + --thumbShadowsColor: #thumbShadowsColor#; +} +.galleryName, +.galleryGalleryName { + --legendHeight: #legendHeight#; + --legendAlign: #legendAlign#; + --legendTextColor: #legendTextColor#; + --legendBgColor: #legendBgColor#; +} +.galleryPicture:hover, +.galleryGalleryPicture:hover { + --thumbOpacity: #thumbOpacity#; +} diff --git a/agenda/vendor/animated-calendar/calendar-gc.min.css b/agenda/vendor/animated-calendar/calendar-gc.min.css new file mode 100644 index 0000000..b55097d --- /dev/null +++ b/agenda/vendor/animated-calendar/calendar-gc.min.css @@ -0,0 +1,287 @@ +@import url(https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap); + +.gc-calendar-wrapper { + transform: scale(0.75); + transform-origin: top left; + width: 133.33%; /* Ajuste la largeur du conteneur pour compenser le redimensionnement */ + height: auto; /* Ajuste la hauteur automatiquement */ +} + +.gc-calendar { + font-family: Inter, sans-serif; + background-color: #fff; + padding: 1rem; +} + +.gc-calendar .gc-calendar-header { + background-color: #fff; + padding: 2px; + height: max-content; + display: flex; + align-items: center; + margin-bottom: 40px; +} + +.gc-calendar .gc-calendar-header button.next, +.gc-calendar .gc-calendar-header button.prev { + height: 36px; + left: 0; + top: 0; + border-radius: 100px; + background: #fff; + border-radius: 100px; + position: relative; + display: inline-block; + border: 0; + padding: 4px 15px; + font-size: 24px; + box-shadow: inset 0 -1px 0 #edf2f7; + cursor: pointer; + color: #7a7a9d; + font-weight: 700; + margin-right: 10px; + width: inherit; +} + +.gc-calendar .gc-calendar-header button.next:hover, +.gc-calendar .gc-calendar-header button.prev:hover { + box-shadow: 0 3px 6px rgba(0, 0, 0, .08), 0 7px 14px rgba(50, 50, 93, .1); +} + +.gc-calendar .gc-calendar-header button.next:focus, +.gc-calendar .gc-calendar-header button.prev:focus { + box-shadow: 0 3px 6px rgba(0, 0, 0, .08), 0 7px 14px rgba(50, 50, 93, .1); + outline: 0; + border: 0; +} + +.gc-calendar .gc-calendar-header button.prev { + margin-left: 20px; +} + +.gc-calendar .gc-calendar-header .gc-calendar-month-year { + font-style: normal; + font-weight: 600; + font-size: 28px; + color: #38385c; + line-height: 136.02%; + min-width: 220px; +} + +.gc-calendar table.calendar { + width: 100%; +} + +.gc-calendar table.calendar th { + text-align: start; + font-weight: 600; + font-size: 14px; + line-height: 136.02%; + padding: 2px; + text-transform: uppercase; + color: #7a7a9d; + position: relative; + padding-bottom: 12px; +} + +.gc-calendar table.calendar td { + height: 150px; + position: relative; + padding-top: 3px; + vertical-align: top; + width: calc(100% / 7); +} + +.gc-calendar table.calendar td.next-month .day-number, +.gc-calendar table.calendar td.prev-month .day-number { + color: #b5b5bd; +} + +.gc-calendar table.calendar td .day-number { + font-size: 24px; + font-weight: 800; + line-height: 38.09px; + overflow-y: auto; + color: #38385c; + text-decoration: none; + display: block; +} + +.gc-calendar table.calendar td .today .day-number { + color: #4c6fff; +} + +.gc-calendar table.calendar a { + text-decoration: none; + display: block; +} + +.gc-calendar table.calendar a:hover { + background-color: #4c6fff; + width: 90%; + border-radius: 5px; + padding-left: 10px; + transition: .2s; +} + +.gc-calendar table.calendar a:hover .day-number { + color: #fff; +} + +.gc-calendar table.calendar th::before, +.gc-calendar table.calendar tr:not(:last-child) td::before { + content: ""; + display: block; + width: 90%; + height: 2px; + border-radius: 1px; + background-color: #8f8f93; + bottom: 0; + left: 0; + position: absolute; +} + +.gc-calendar table.calendar td:hover { + background: linear-gradient(90deg, #e1e8ff 90%, transparent 50%); + padding-left: 10px; + padding-right: 10px; + transition: .3s; +} + +.gc-calendar .gc-event { + display: block; + overflow: hidden; + margin-bottom: 10px; +} + +.slide-in-left { + -webkit-animation: slide-in-left .5s cubic-bezier(.25, .46, .45, .94) both; + animation: slide-in-left .5s cubic-bezier(.25, .46, .45, .94) both; +} + +.slide-in-right { + -webkit-animation: slide-in-right .5s cubic-bezier(.25, .46, .45, .94) both; + animation: slide-in-right .5s cubic-bezier(.25, .46, .45, .94) both; +} + +.slide-out-left { + -webkit-animation: slide-out-left .5s cubic-bezier(.55, .085, .68, .53) both; + animation: slide-out-left .5s cubic-bezier(.55, .085, .68, .53) both; +} + +.slide-out-right { + -webkit-animation: slide-out-right .5s cubic-bezier(.55, .085, .68, .53) both; + animation: slide-out-right .5s cubic-bezier(.55, .085, .68, .53) both; +} + +@-webkit-keyframes slide-in-left { + 0% { + -webkit-transform: translateX(-1000px); + transform: translateX(-1000px); + opacity: 0; + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } +} + +@keyframes slide-in-left { + 0% { + -webkit-transform: translateX(-1000px); + transform: translateX(-1000px); + opacity: 0; + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } +} + +@-webkit-keyframes slide-in-right { + 0% { + -webkit-transform: translateX(1000px); + transform: translateX(1000px); + opacity: 0; + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } +} + +@keyframes slide-in-right { + 0% { + -webkit-transform: translateX(1000px); + transform: translateX(1000px); + opacity: 0; + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } +} + +@-webkit-keyframes slide-out-left { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(-1000px); + transform: translateX(-1000px); + opacity: 0; + } +} + +@keyframes slide-out-left { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(-1000px); + transform: translateX(-1000px); + opacity: 0; + } +} + +@-webkit-keyframes slide-out-right { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(1000px); + transform: translateX(1000px); + opacity: 0; + } +} + +@keyframes slide-out-right { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(1000px); + transform: translateX(1000px); + opacity: 0; + } +} diff --git a/agenda/vendor/animated-calendar/calendar-gc.min.js b/agenda/vendor/animated-calendar/calendar-gc.min.js new file mode 100644 index 0000000..68286e4 --- /dev/null +++ b/agenda/vendor/animated-calendar/calendar-gc.min.js @@ -0,0 +1,142 @@ +var gcObject = { + options: options = { + dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + dayBegin: 1, + monthNames: [], + onPrevMonth: function (e) {}, + onNextMonth: function (e) {}, + events: [{ + date: null, + eventName: null, + className: null, + onclick: function (e, t) {}, + dateColor: "#38385c" + }], + onclickDate: function (e, t) {}, + nextIcon: ">", + prevIcon: "<" + }, + el: "", + eventAnimate: "none", + pickedDate: new Date, + setDate(e) { + const t = new Date(e); + t != this.pickedDate && (t > this.pickedDate ? this.eventAnimate = "next" : this.eventAnimate = "prev", this.pickedDate = t, this.render()) + }, + setEvents(e) { + this.options.events = e, this.render() + }, + prevMonth() { + this.pickedDate = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth() - 2, 1), this.options.onPrevMonth(this.pickedDate), this.eventAnimate = "prev", this.render() + }, + nextMonth() { + this.pickedDate = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), 1), this.options.onNextMonth(this.pickedDate), this.eventAnimate = "next", this.render() + }, + render() { + const e = $(this.el); + e.html(""); + const t = $('
'); + e.append(t); + const n = $('
'); + n.appendTo(t); + const a = $(''); + a.appendTo(n); + $(`${this.options.monthNames[this.pickedDate.getMonth()]}`).appendTo(a); + $(` ${this.pickedDate.getFullYear()}`).appendTo(a); + const o = $(``); + o.appendTo(n), o.on("click", (function (e) { + gcObject.prevMonth() + })); + const s = $(``); + s.appendTo(n), s.on("click", (function (e) { + gcObject.nextMonth() + })); + const i = $('
'); + i.removeClass("slide-in-left slide-in-right slide-out-left slide-out-right"), "none" == this.eventAnimate ? i.hide().addClass("slide-in-left").show() : "prev" == this.eventAnimate ? i.hide().addClass("slide-out-right").show().delay(200).hide().removeClass("slide-out-right").addClass("slide-in-left").show() : i.hide().addClass("slide-out-left").show().delay(200).hide().removeClass("slide-out-left").addClass("slide-in-right").show(), i.appendTo(t); + const c = $(""); + c.appendTo(i); + const d = $(""); + d.appendTo(c); + const l = this.options.dayNames.length; + for (let e = 0; e < l; e++) { + var h = e + gcObject.options.dayBegin; + h >= l && (h -= l); + const t = gcObject.options.dayNames[h]; + $('' + t + "").appendTo(d) + } + var r = $(""); + r.appendTo(i); + const p = this.getCalendarArray(), + g = new Date; + p.forEach((function (e) { + var t = $(""); + e.forEach((function (e) { + var n = $(''); + n.appendTo(t); + var a = $(''); + n.append(a), a.click((function (t) { + gcObject.options.onclickDate(t, e) + })); + var o = $(`${e.date}`); + n.addClass(e.class), o.appendTo(a), g.getFullYear() == e.datejs.getFullYear() && g.getMonth() == e.datejs.getMonth() && g.getDate() == e.datejs.getDate() && a.addClass("today"); + var s = ""; + gcObject.options.events.forEach((function (t) { + if (t.date.getFullYear() == e.datejs.getFullYear() && t.date.getMonth() == e.datejs.getMonth() && t.date.getDate() == e.datejs.getDate()) { + n.addClass("event"); + var a = $(`
${t.eventName}
`); + s = "color:" + (t.dateColor || "inherit"), a.on("click", (function (e) { + t.onclick(e, t) + })), n.append(a) + } + })), o.attr("style", s) + })), t.appendTo(r) + })) + }, + getCalendarArray() { + var e = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), 1).getDay(), + t = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth() + 1, 0).getDate(), + n = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), 0).getDate(), + a = [], + o = e - gcObject.options.dayBegin; + o < 0 && (o = 7 + o); + for (let e = 0; e < o; e++) a.push({ + datejs: new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth() - 1, n), + date: n, + class: "prev-month" + }), n--; + a.reverse(); + var s = 1; + for (let e = a.length; e < 7; e++) a.push({ + datejs: new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), s), + date: s, + class: "current-month" + }), s++; + var i = [a], + c = !1, + d = this.pickedDate, + l = "current-month"; + for (let e = 1; e < 6; e++) { + var h = []; + for (let e = 0; e < 7; e++) h.push({ + datejs: new Date(d.getFullYear(), d.getMonth(), s), + date: s, + class: l + }), ++s > t && (s = 1, d.setDate(1), d.setMonth(d.getMonth() + 1), c = !0, l = "next-month"); + if (i.push(h), c) break + } + return i + } +}; +jQuery.fn.calendarGC = function (e = { + dayNames: dayNames, + dayBegin: dayBegin, + monthNames: monthNames, + onPrevMonth: onPrevMonth, + onNextMonth: onNextMonth, + events: events, + onclickDate: onclickDate, + nextIcon: ">", + prevIcon: "<" +}) { + return gcObject.options.dayNames = e.dayNames || ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], gcObject.options.dayBegin = void 0 === e.dayBegin || null === e.dayBegin ? 1 : e.dayBegin, gcObject.options.monthNames = e.monthNames || ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], gcObject.options.onPrevMonth = e.onPrevMonth || function (e) {}, gcObject.options.onNextMonth = e.onNextMonth || function (e) {}, gcObject.options.events = e.events || [], gcObject.options.onclickDate = e.onclickDate || function (e, t) {}, gcObject.options.nextIcon = e.nextIcon || ">", gcObject.options.prevIcon = e.prevIcon || "<", gcObject.el = this, gcObject.render(), gcObject +}; \ No newline at end of file diff --git a/agenda/vendor/animated-calendar/inc.json b/agenda/vendor/animated-calendar/inc.json new file mode 100644 index 0000000..ee6dfca --- /dev/null +++ b/agenda/vendor/animated-calendar/inc.json @@ -0,0 +1,4 @@ +[ + "calendar-gc.min.css", + "calendar-gc.min.js" +] \ No newline at end of file diff --git a/agenda/view/add/add.css b/agenda/view/add/add.css new file mode 100644 index 0000000..407c026 --- /dev/null +++ b/agenda/view/add/add.css @@ -0,0 +1,22 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + + + +/** NE PAS EFFACER +* admin.css +*/ +.cp-color-picker { + z-index: 100; +} \ No newline at end of file diff --git a/agenda/view/add/add.js.php b/agenda/view/add/add.js.php new file mode 100644 index 0000000..c415309 --- /dev/null +++ b/agenda/view/add/add.js.php @@ -0,0 +1,11 @@ +$(document).ready(function() { + // Ajoute un événement sur le changement de l'état de la checkbox agendaAddAllDay + $('#agendaAddAllDay').on('change', function() { + if ($(this).is(':checked')) { + $('#agendaAddTime').val(''); + $('#agendaAddTimeWrapper').slideUp(); // Masque avec un effet de slide + } else { + $('#agendaAddTimeWrapper').slideDown(); // Affiche avec un effet de slide + } + }); +}); \ No newline at end of file diff --git a/agenda/view/add/add.php b/agenda/view/add/add.php new file mode 100644 index 0000000..730228f --- /dev/null +++ b/agenda/view/add/add.php @@ -0,0 +1,60 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'value' => template::ico('left') + ]); ?> +
+
+ +
+
+
+
+
+

+
+
+ 'Titre', + ]); ?> +
+
+ 'Date', + 'type' => 'date', + ]); ?> +
+
+ 'colorPicker', + 'help' => 'A ne paramétrer que sur un seul événement du jour. Le curseur horizontal règle le niveau de transparence.', + 'label' => 'Couleur de la date du jour', + ]); ?> +
+
+
+
+ false + ]); ?> +
+
+ 'Horaire', + 'type' => 'time', + 'help' => 'Ne pas indiquer d\'horaire quand l\'événement est sur la journée entière.', + ]); ?> +
+
+ 'Classe CSS', + 'help' => 'La feuille de style de la page contient ces classes.', + ]); ?> +
+
+
+
+ \ No newline at end of file diff --git a/agenda/view/config/config.css b/agenda/view/config/config.css new file mode 100644 index 0000000..30c9e90 --- /dev/null +++ b/agenda/view/config/config.css @@ -0,0 +1,24 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + + + +/** NE PAS EFFACER +* admin.css +*/ + +.galleryConfigError { + color: #F3674A; + font-weight: bold; +} \ No newline at end of file diff --git a/agenda/view/config/config.php b/agenda/view/config/config.php new file mode 100644 index 0000000..cf76071 --- /dev/null +++ b/agenda/view/config/config.php @@ -0,0 +1,31 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0), + 'value' => template::ico('left') + ]); ?> +
+ --> +
+ helper::baseUrl() . $this->getUrl(0) . '/add/', + 'value' => template::ico('plus'), + 'class' => 'buttonGreen' + ]); ?> +
+
+ +
+
+ + + + + +
+
Version n° + +
+
\ No newline at end of file diff --git a/agenda/view/edit/edit.css b/agenda/view/edit/edit.css new file mode 100644 index 0000000..271ab03 --- /dev/null +++ b/agenda/view/edit/edit.css @@ -0,0 +1,18 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + + +/** NE PAS EFFACER +* admin.css +*/ diff --git a/agenda/view/edit/edit.js.php b/agenda/view/edit/edit.js.php new file mode 100644 index 0000000..933f814 --- /dev/null +++ b/agenda/view/edit/edit.js.php @@ -0,0 +1,37 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + +$(document).ready(function() { + // Vérifie si la variable PHP $time est vide ou non + var time = 'getData(["module", $this->getUrl(0), "content", $this->getUrl(2), "time"]); ?>'; + + // Initialisation de l'affichage au chargement de la page + if (time === '') { + $('#agendaEditAllDay').prop('checked', true); + $('#agendaEditTimeWrapper').slideUp(); // Masque immédiatement sans animation + } else { + $('#agendaEditAllDay').prop('checked', false); + $('#agendaEditTimeWrapper').slideDown(); // Affiche immédiatement sans animation + } + + // Ajoute un événement sur le changement de l'état de la checkbox agendaEditAllDay + $('#agendaEditAllDay').on('change', function() { + if ($(this).is(':checked')) { + $('#agendaEditTime').val(''); + $('#agendaEditTimeWrapper').slideUp(); // Masque avec un effet de slide + } else { + $('#agendaEditTimeWrapper').slideDown(); // Affiche avec un effet de slide + } + }); +}); diff --git a/agenda/view/edit/edit.php b/agenda/view/edit/edit.php new file mode 100644 index 0000000..94b2a43 --- /dev/null +++ b/agenda/view/edit/edit.php @@ -0,0 +1,65 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'value' => template::ico('left') + ]); ?> +
+
+ +
+
+
+
+
+

+
+
+ 'Titre', + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'eventName']) + ]); ?> +
+
+ 'Date', + 'type' => 'date', + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'date']) + ]); ?> +
+
+ 'colorPicker', + 'help' => 'A ne paramétrer que sur un seul événement du jour. Le curseur horizontal règle le niveau de transparence.', + 'label' => 'Couleur de la date du jour', + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'dateColor']) + ]); ?> +
+
+
+
+ false + ]); ?> +
+
+ 'Horaire', + 'type' => 'time', + 'help' => 'Ne pas indiquer d\'horaire quand l\'événement est sur la journée entière.', + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'time']) + ]); ?> +
+
+ 'Classe CSS', + 'help' => 'La feuille de style de la page contient ces classes.', + 'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'className']) + ]); ?> +
+
+
+
+ \ No newline at end of file diff --git a/agenda/view/index/index.css b/agenda/view/index/index.css new file mode 100644 index 0000000..76b7417 --- /dev/null +++ b/agenda/view/index/index.css @@ -0,0 +1,45 @@ +.popup-overlay { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999; + font-family: 'Inter', sans-serif; /* Utilisation de la police Inter */ + font-size: 18px; /* Taille de police de 24px */ + } + + .popup-content, .popup-listcontent{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: white; + padding: 20px; + border-radius: 5px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); + width: 300px; + text-align: center; + font-family: 'Inter', sans-serif; /* Assurer la police Inter dans la popup */ + } + .popup-content { + text-align: center; + } + .popup-listcontent { + text-align: left; + } + + .close-btn { + position: absolute; + top: 10px; + right: 10px; + cursor: pointer; + font-size: 12px; /* Taille de la croix de fermeture */ + } + + .gc-calendar-month-year { + cursor: pointer; +} + \ No newline at end of file diff --git a/agenda/view/index/index.js.php b/agenda/view/index/index.js.php new file mode 100644 index 0000000..ed913c2 --- /dev/null +++ b/agenda/view/index/index.js.php @@ -0,0 +1,194 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + + + +const jsonOptions = ''; +const objOptions = JSON.parse(jsonOptions); +//console.log(objOptions); + +const events = generateEvents(objOptions); + +// https://www.jqueryscript.net/time-clock/animated-calendar-event-gc.html + +$(function (e) { + var calendar = $("#calendar").calendarGC({ + dayBegin: 0, + dayNames: ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'], + monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'], + prevIcon: '<', + homeIcon: 'H', + nextIcon: '>', + onPrevMonth: function (e) { + console.log("prev"); + //console.log(e); + }, + onNextMonth: function (e) { + console.log("next"); + //console.log(e); + }, + events: events, + + onclickDate: function (e, data) { + // Extraire la date cliquée au format YYYY-MM-DD + var targetDate = formatDate(data.datejs); + console.log(data); + // Filtrer les événements pour la date cliquée + var filteredEvents = $.grep(events, function (event) { + //console.log("Comparaison avec : " + formatDate(event.date)); + return formatDate(event.date) === targetDate; + }); + + // Vérifier le nombre d'événements trouvés + //console.log("Nombre d'événements trouvés : " + filteredEvents.length); + + // Construire le contenu de la popup avec les événements du jour + if (filteredEvents.length > 0) { + // Si des événements sont trouvés, les afficher + eventListHtml = '
    '; + $.each(filteredEvents, function (index, event) { + // Vérifier si une heure est spécifiée et formater correctement + console.log(event); + var eventTime = event.eventTime ? event.eventTime : 'toute la journée'; + eventListHtml += '
  • ' + event.eventName + '
    ' + eventTime + '
  • '; + }); + // Titre de la popup + eventListHtml += '
'; + $('#popupDate').html('Événements du ' + formatDateToDMY(targetDate)); + + } else { + // Sinon, afficher "Aucun événement" + eventListHtml = ''; + $('#popupDate').html('Aucun événement le ' + formatDateToDMY(targetDate)); + } + + // Injecter le contenu dans la popup + $('#eventList').html(eventListHtml); + + // Afficher la popup + $('#eventListPopup').fadeIn(); + + // Fermer la popup lorsqu'on clique sur le bouton de fermeture + $('.close-btn').on('click', function () { + $('#eventListPopup').fadeOut(); + }); + + // Fermer la popup lorsqu'on clique en dehors du contenu + $('#eventListPopup').on('click', function (e) { + if ($(e.target).is('.popup-overlay')) { + $(this).fadeOut(); + } + }); + } + }); + + // Ajoute un écouteur d'événement pour le clic sur l'élément avec la classe gc-calendar-month-year + $(document).on('click', '.gc-calendar-month-year', function() { + // Obtient la date courante + var currentDate = new Date(); + + // Formate la date au format "YYYY-MM-DD" + var formattedDate = currentDate.toISOString().split('T')[0]; + + // Définit la date du calendrier sur la date courante + calendar.setDate(formattedDate); + }); + + +}); + + + +function showPopup(data) { + + var eventName = data.eventName; + + // Extraire la date et l'heure + var eventDate = data.date.toLocaleDateString(); // Format : 18/08/2024 + // Vérifier si l'heure est définie et extraire l'heure si disponible + var eventTime = data.eventTime === "" || data.date.getMinutes() ? + data.date.toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit' + }) : + ''; // Format : 12:00 + + // Injecter les informations dans la popup + $('#eventName').text(eventName); + $('#eventDate').text(eventDate); + console.log(eventTime); + if (eventTime === '') { + $('.eventTime').empty(); + $('.eventTime').append('Toute la journée'); + } else { + $('#eventTime').text(eventTime); + } + + + // Afficher la popup + $('#eventPopup').fadeIn(); + + // Fermer la popup lorsqu'on clique sur le bouton de fermeture + $('.close-btn').on('click', function () { + $('#eventPopup').fadeOut(); + }); + + // Fermer la popup lorsqu'on clique en dehors du contenu + $('#eventPopup').on('click', function (e) { + if ($(e.target).is('.popup-overlay')) { + $(this).fadeOut(); + } + }); +} + + +function generateEvents(objOptions) { + return objOptions.map(function (item) { + return { + date: new Date(item.date), // Convertir la chaîne de date en objet Date + eventTime: item.time, + eventName: item.eventName, + className: item.className || '', // Ajouter une classe CSS si disponible + dateColor: item.dateColor || '', // Ajouter une couleur de date si disponible + onclick: function (e, data) { // Ajouter une fonction onclick + showPopup(data); + } + }; + }); +} + +function formatDate(datejs) { + var year = datejs.getFullYear(); + var month = ('0' + (datejs.getMonth() + 1)).slice(-2); // Ajouter un zéro devant si nécessaire + var day = ('0' + datejs.getDate()).slice(-2); // Ajouter un zéro devant si nécessaire + return year + '-' + month + '-' + day; +} + +function formatDateToDMY(dateString) { + // Convertir la chaîne de caractères en objet Date + var datejs = new Date(dateString); + + // Créer un tableau des noms de mois + var monthNames = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', + 'août', 'septembre', 'octobre', 'novembre', 'décembre' + ]; + + // Obtenir le jour, le mois et l'année + var day = datejs.getDate(); + var month = monthNames[datejs.getMonth()]; + var year = datejs.getFullYear(); + + // Retourner la date au format "jour mois année" + return day + ' ' + month + ' ' + year; +} \ No newline at end of file diff --git a/agenda/view/index/index.php b/agenda/view/index/index.php new file mode 100644 index 0000000..44214fb --- /dev/null +++ b/agenda/view/index/index.php @@ -0,0 +1,20 @@ + +
+ + + + + \ No newline at end of file diff --git a/geogallery/changes.md b/geogallery/changes.md new file mode 100644 index 0000000..87c37ef --- /dev/null +++ b/geogallery/changes.md @@ -0,0 +1,2 @@ +# Version 0.1 +- GeoGallery est basé sur le module gallery 4.1 \ No newline at end of file diff --git a/geogallery/enum.json b/geogallery/enum.json new file mode 100644 index 0000000..3a239a4 --- /dev/null +++ b/geogallery/enum.json @@ -0,0 +1 @@ +{"name":"geogallery","realName":"GéoGalerie","version":"0.9","update":"0.0","delete":true,"dataDirectory":"site\/data\/geogallery\/"} \ No newline at end of file diff --git a/geogallery/geogallery.php b/geogallery/geogallery.php new file mode 100644 index 0000000..661a6b2 --- /dev/null +++ b/geogallery/geogallery.php @@ -0,0 +1,542 @@ + + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + +class geogallery extends common +{ + + const VERSION = '0.9'; + const REALNAME = 'GéoGalerie'; + const DATADIRECTORY = self::DATA_DIR . 'geogallery/'; + + const SORT_ASC = 'SORT_ASC'; + const SORT_DSC = 'SORT_DSC'; + const SORT_HAND = 'SORT_HAND'; + + public static $galleries = []; + + public static $galleriesId = []; + + public static $pictures = []; + + public static $picturesId = []; + + public static $galleriesCenter = []; + + public static $actions = [ + 'config' => self::GROUP_EDITOR, + 'delete' => self::GROUP_EDITOR, + 'dirs' => self::GROUP_EDITOR, + 'edit' => self::GROUP_EDITOR, + 'add' => self::GROUP_EDITOR, + 'index' => self::GROUP_VISITOR + ]; + + + /** + * Mise à jour du module + * Appelée par les fonctions index et config + */ + private function update() + { + + //$versionData = $this->getData(['module', $this->getUrl(0), 'config', 'versionData']); + + } + + + /** + * Configuration + */ + public function config() + { + + // Mise à jour des données de module + $this->update(); + + //Affichage de la galerie triée + $galleries = $this->getData(['module', $this->getUrl(0), 'content']); + + // Traitement de l'affichage + if ($galleries) { + foreach ($galleries as $galleryId => $gallery) { + // Erreur dossier vide + if (is_dir($gallery['config']['directory'])) { + if (count(scandir($gallery['config']['directory'])) === 2) { + $gallery['config']['directory'] = '' . $gallery['config']['directory'] . ' (dossier vide)'; + } + } + // Erreur dossier supprimé + else { + $gallery['config']['directory'] = '' . $gallery['config']['directory'] . ' (dossier introuvable)'; + } + // Met en forme le tableau + self::$galleries[] = [ + $gallery['config']['name'], + $gallery['config']['directory'], + template::button('galleryConfigEdit' . $galleryId, [ + 'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $galleryId, + 'value' => template::ico('pencil'), + 'help' => 'Configuration' + ]), + template::button('galleryConfigDelete' . $galleryId, [ + 'class' => 'galleryConfigDelete buttonRed', + 'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $galleryId, + 'value' => template::ico('trash'), + 'help' => 'Supprimer' + ]) + ]; + // Tableau des id des galleries pour le drag and drop + self::$galleriesId[] = $galleryId; + } + } + + // Valeurs en sortie + $this->addOutput([ + 'title' => helper::translate('Configuration'), + 'view' => 'config' + ]); + } + + /** + * Ajout d'une galerie + */ + public function add() + { + // Soumission du formulaire d'ajout d'une galerie + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && + $this->isPost() + ) { + $galleryId = $this->getInput('galleryAddName', null, true); + $success = false; + if ($galleryId) { + $galleryId = helper::increment($this->getInput('galleryAddName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0), 'content'])); + // définir une vignette par défaut + $directory = $this->getInput('galleryAddDirectory', helper::FILTER_STRING_SHORT, true); + $iterator = new DirectoryIterator($directory); + $i = 0; + foreach ($iterator as $fileInfos) { + if ($fileInfos->isDot() === false and $fileInfos->isFile() and @getimagesize($fileInfos->getPathname())) { + $i += 1; + // Créer la miniature si manquante + if (!file_exists(str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) { + $this->makeThumb( + $fileInfos->getPathname(), + str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), + self::THUMBS_WIDTH + ); + } + break; + } + } + // Le dossier de la galerie est vide + if ($i > 0) { + $this->setData([ + 'module', + $this->getUrl(0), + 'content', + $galleryId, + [ + 'config' => [ + 'name' => $this->getInput('galleryAddName'), + 'directory' => $this->getInput('galleryAddDirectory', helper::FILTER_STRING_SHORT, true), + ], + 'legend' => [], + 'position' => [] + ] + ]); + $success = true; + } else { + self::$inputNotices['galleryAddDirectory'] = "Le dossier sélectionné ne contient aucune image"; + $success = false; + } + } + + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'notification' => helper::translate('Modifications enregistrées'), + 'state' => true + ]); + + } + // Valeurs en sortie + $this->addOutput([ + 'title' => helper::translate('Nouvelle galerie'), + 'view' => 'add' + ]); + + } + /** + * Suppression + */ + public function delete() + { + // La galerie n'existe pas + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) !== true || + $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]) === null + ) { + // Valeurs en sortie + $this->addOutput([ + 'access' => false + ]); + } + // Suppression + else { + $this->deleteData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]); + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'notification' => helper::translate('Galerie effacée'), + 'state' => true + ]); + } + } + + /** + * Liste des dossiers + */ + public function dirs() + { + // Valeurs en sortie + $this->addOutput([ + 'display' => self::DISPLAY_JSON, + 'content' => geogalleriesHelper::scanDir(self::FILE_DIR . 'source') + ]); + } + + /** + * Édition + */ + public function edit() + { + // Soumission du formulaire + if ( + $this->getUser('permission', __CLASS__, __FUNCTION__) === true && + $this->isPost() + ) { + // légendes + $legend = (array) $this->getInput('legend', null); + foreach ($legend as $file => $data) { + $legends[str_replace('.', '', $file)] = empty($data) ? $file : helper::filter($data, helper::FILTER_STRING_SHORT); + } + // Données géographique + foreach ($legend as $file => $data) { + $geo[str_replace('.', '', $file)] = [ + 'long' => $this->getInput('gpslong[' . $file . ']', helper::FILTER_FLOAT), + 'lat' => $this->getInput('gpslat[' . $file . ']', helper::FILTER_FLOAT) + ]; + } + // Sauvegarder + $this->setData([ + 'module', + $this->getUrl(0), + 'content', + $this->getUrl(2), + [ + 'config' => [ + // Données mises à jour par les options + 'name' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name']), + 'directory' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']), + ], + 'legend' => $legends, + //'geo' => $geo, + 'position' => $geo + ] + ]); + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', + 'notification' => helper::translate('Modifications enregistrées'), + 'state' => true + ]); + } + // La galerie n'existe pas + if ($this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]) === null) { + // Valeurs en sortie + $this->addOutput([ + 'access' => false + ]); + } + // La galerie existe + else { + // Met en forme le tableau + $directory = $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']); + if (is_dir($directory)) { + $iterator = new DirectoryIterator($directory); + foreach ($iterator as $fileInfos) { + if ($fileInfos->isDot() === false and $fileInfos->isFile() and @getimagesize($fileInfos->getPathname())) { + // Créer la miniature RFM si manquante + if (!file_exists(str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename()))) { + $this->makeThumb( + $fileInfos->getPathname(), + str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename()), + 122 + ); + } + // Obtenir les métadonnées EXIF de l'image + $exif = exif_read_data($fileInfos->getPath() . '/' . $fileInfos->getFilename()); + $latitude = 'Donnée absente'; + $longitude = 'Donnée absente'; + // Vérifier si les données EXIF contiennent des informations de géolocalisation + if (!empty($exif['GPSLatitude']) && !empty($exif['GPSLongitude'])) { + // Coordonnées de latitude + $latitude = $this->gps_decimal($exif['GPSLatitude'], $exif['GPSLatitudeRef']); + + // Coordonnées de longitude + $longitude = $this->gps_decimal($exif['GPSLongitude'], $exif['GPSLongitudeRef']); + } + + self::$pictures[str_replace('.', '', $fileInfos->getFilename())] = [ + //$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'position', str_replace('.', '', $fileInfos->getFilename())]) + 1, + $fileInfos->getFilename(), + template::text('legend[' . $fileInfos->getFilename() . ']', [ + 'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'legend', str_replace('.', '', $fileInfos->getFilename())]) + ]), + 'Lat: ' . round($latitude, 5) . ' - Long:' . round($longitude, 5), + + ' ', + //' ', + '', + ]; + self::$picturesId[] = str_replace('.', '', $fileInfos->getFilename()); + } + } + } + } + // Valeurs en sortie + $this->addOutput([ + 'title' => sprintf(helper::translate('Galerie %s '), $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name'])), + 'view' => 'edit' + ]); + } + + /** + * Accueil (deux affichages en un pour éviter une url à rallonge) + */ + public function index() + { + + // Mise à jour des données de module + $this->update(); + + // Initialise la feuille de style + if (empty($this->getData(['page', $this->getUrl(0), 'css']))) { + $this->initCss(); + } + + // Liste des galeries + $locations = $this->getData(['module', $this->getUrl(0), 'content']); + if (is_null($locations)) { + // initialisation de la BDD + $this->setData(['module', $this->getUrl(0), 'content', []]); + // Construit les données pour le js + } elseif (!empty($locations)) { + $galleries = array_keys($this->getData(['module', $this->getUrl(0), 'content'])); + foreach ($galleries as $key => $gallery) { + $directory = $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'directory']); + if (is_dir($directory)) { + $iterator = new DirectoryIterator($directory); + + foreach ($iterator as $fileInfos) { + + if ($fileInfos->isDot() === false and $fileInfos->isFile() and @getimagesize($fileInfos->getPathname())) { + + // Créer la miniature si manquante + if (!file_exists(str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) { + $this->makeThumb( + $fileInfos->getPathname(), + str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), + self::THUMBS_WIDTH + ); + } + + $exif = exif_read_data($fileInfos->getPath() . '/' . $fileInfos->getFilename()); + + // Vérifier si les données EXIF contiennent des informations de géolocalisation + if (!empty($exif['GPSLatitude']) || !empty($exif['GPSLongitude'])) { + // Coordonnées + self::$galleries[] = [ + 'lat' => $this->gps_decimal($exif['GPSLatitude'], $exif['GPSLatitudeRef']), + 'long' => $this->gps_decimal($exif['GPSLongitude'], $exif['GPSLatitudeRef']), + 'img' => $fileInfos->getPath() . '/' . strtolower($fileInfos->getFilename()), + 'thumb' => str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), + 'label' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.', '', $fileInfos->getFilename())]) + ]; + } else { + self::$galleries[] = [ + 'lat' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'position', 'directory', str_replace('.', '', $fileInfos->getFilename())]), + 'long' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'position', 'directory', str_replace('.', '', $fileInfos->getFilename())]), + 'img' => $fileInfos->getPath() . '/' . strtolower($fileInfos->getFilename()), + 'thumb' => str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), + 'label' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.', '', $fileInfos->getFilename())]) + ]; + } + } + } + } + } + // Calcul du point central + + // Calculer le centre géographique + $totalLat = 0; + $totalLong = 0; + $count = count(self::$galleries); + + foreach (self::$galleries as $coordinate) { + $totalLat += $coordinate["lat"]; + $totalLong += $coordinate["long"]; + } + + $centerLat = $totalLat / $count; + $centerLong = $totalLong / $count; + + // Calculer la distance maximale au centre pour déterminer le niveau de zoom + $maxDistance = 0; + foreach (self::$galleries as $coordinate) { + if ( + is_numeric($centerLat) + && is_numeric($centerLong) + && $coordinate["lat"] + && $coordinate["long"] + ) { + $distance = $this->haversineGreatCircleDistance($centerLat, $centerLong, $coordinate["lat"], $coordinate["long"]); + if ($distance > $maxDistance) { + $maxDistance = $distance; + } + } + + } + + $zoomLevel = $this->getZoomLevel($maxDistance); + + self::$galleriesCenter = array( + 'lat' => $centerLat, + 'long' => $centerLong, + 'zoom' => $zoomLevel + ); + } + + // Valeurs en sortie + $this->addOutput([ + 'showBarEditButton' => true, + 'showPageContent' => true, + 'view' => 'index', + 'vendor' => [ + 'leaflet' + ], + ]); + } + + + // Fonction pour convertir les coordonnées GPS au format décimal + private function gps_decimal($coordinate, $hemisphere) + { + // Extrait les degrés, minutes et secondes + $degrees = count($coordinate) > 0 ? $this->gps2Num($coordinate[0]) : 0; + $minutes = count($coordinate) > 1 ? $this->gps2Num($coordinate[1]) : 0; + $seconds = count($coordinate) > 2 ? $this->gps2Num($coordinate[2]) : 0; + + // Convertit les degrés, minutes et secondes en décimal + $decimal = $degrees + ($minutes / 60) + ($seconds / 3600); + + // Si l'hémisphère est au Sud ou à l'Ouest, les coordonnées sont négatives + $decimal *= ($hemisphere == 'S' || $hemisphere == 'W') ? -1 : 1; + + return $decimal; + } + + // Fonction pour convertir les coordonnées GPS en nombre + private function gps2Num($coordPart) + { + $parts = explode('/', $coordPart); + if (count($parts) <= 0) + return 0; + if (count($parts) == 1) + return $parts[0]; + return floatval($parts[0]) / floatval($parts[1]); + } + + // Fonction pour calculer la distance entre deux points géographiques + private function haversineGreatCircleDistance($latitudeFrom, $longitudeFrom, $latitudeTo, $longitudeTo, $earthRadius = 6371) + { + $latFrom = deg2rad($latitudeFrom); + $lonFrom = deg2rad($longitudeFrom); + $latTo = deg2rad($latitudeTo); + $lonTo = deg2rad($longitudeTo); + + $latDelta = $latTo - $latFrom; + $lonDelta = $lonTo - $lonFrom; + + $angle = 2 * asin(sqrt(pow(sin($latDelta / 2), 2) + + cos($latFrom) * cos($latTo) * pow(sin($lonDelta / 2), 2))); + return $angle * $earthRadius; + } + + // Déterminer le niveau de zoom +// Cette fonction est une approximation pour le calcul du zoom + private function getZoomLevel($maxDistance) + { + $maxZoom = 21; // Le zoom maximal pour Leaflet + $earthCircumference = 40075; // La circonférence de la Terre en km + + for ($zoom = $maxZoom; $zoom >= 0; $zoom--) { + if ($maxDistance < ($earthCircumference / pow(2, $zoom))) { + return $zoom; + } + } + return 0; + } + + // Page de module vide + private function initCss() + { + // Feuille de styles + $cssContent = + '#map { + height: 500px; + width: auto; + } + .leaflet-popup-content { + text-align: center; + }'; + $this->setData(['page', $this->getUrl(0), 'css', $cssContent]); + } + +} + +class geogalleriesHelper extends helper +{ + + /** + * Scan le contenu d'un dossier et de ses sous-dossiers + * @param string $dir Dossier à scanner + * @return array + */ + public static function scanDir($dir) + { + $dirContent = []; + $iterator = new DirectoryIterator($dir); + foreach ($iterator as $fileInfos) { + if ($fileInfos->isDot() === false and $fileInfos->isDir()) { + $dirContent[] = $dir . '/' . $fileInfos->getBasename(); + $dirContent = array_merge($dirContent, self::scanDir($dir . '/' . $fileInfos->getBasename())); + } + } + return $dirContent; + } +} \ No newline at end of file diff --git a/geogallery/i18n/de.json b/geogallery/i18n/de.json new file mode 100644 index 0000000..9291146 --- /dev/null +++ b/geogallery/i18n/de.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Zeigen Sie den Inhalt der Seite mit der Galerie an", + "Alignement du bouton de retour": "Return -Taste -Ausrichtung", + "Alphabétique ": "Alphabetisch", + "Alphabétique inverse": "Alphabetik umgekehrt", + "Au-dessus": "Über", + "Aucune galerie": "Keine Galerie", + "Bordure": "Bordüre", + "Configuration de la galerie %s ": "Galeriekonfiguration %s", + "Configuration des galeries": "Die Konfiguration der Galer", + "Couleur de la bordure": "Randfarbe", + "Couverture": "Decke", + "Discrète": "Diskret", + "Distribué avec marges": "Verteilt", + "Distribué sans marge": "Ohne Rand verteilt", + "Dossier cible": "Zieldatei", + "En dessous": "Unter", + "Epaisse": "Dick", + "Fine": "Bußgeld", + "Forte": "Stärke", + "Galerie ajoutée": "Galerie hinzugefügt", + "Galerie effacée": "Gelobte Galerie", + "Légende": "Legende", + "Légendes": "Legenden", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "Maske", + "Mode plein écran automatique": "Automatischer Vollmodus", + "Opacité au survol": "Opazität im Überflug", + "Options de configuration": "Optionen de Konfiguration", + "Proportionnelle": "Proportional", + "Supprimer cette galerie ?": "Diese Galerie entfernen?", + "Tri des images": "Bilder sortieren", + "Très Discrète": "Sehr diskret", + "Très fine": "Sehr gut", + "Très forte": "Sehr stark", + "Très épaisse": "Sehr dick", + "Vignettes": "Vignetten", + "Ajouter une galerie": "Eine Galerie hinzufügen", + "Éditer une galerie": "Eine Galerie bearbeiten", + "Effacer une galerie": "Eine Galerie löschen", + "Options des galeries": "Galerieoptionen", + "Thème des galeries": "Galeriethemen" +} \ No newline at end of file diff --git a/geogallery/i18n/en_EN.json b/geogallery/i18n/en_EN.json new file mode 100644 index 0000000..fe98265 --- /dev/null +++ b/geogallery/i18n/en_EN.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Show the content of the page with the gallery", + "Alignement du bouton de retour": "Return button alignment", + "Alphabétique ": "Alphabetical", + "Alphabétique inverse": "Reverse alphabetics", + "Au-dessus": "Above", + "Aucune galerie": "No gallery", + "Bordure": "Border", + "Configuration de la galerie %s ": "Gallery settings %s ", + "Configuration des galeries": "Galleries's settings", + "Couleur de la bordure": "Border color", + "Couverture": "Cover", + "Discrète": "Discreet", + "Distribué avec marges": "Distributed with margins", + "Distribué sans marge": "Distributed without margin", + "Dossier cible": "Target file", + "En dessous": "Below", + "Epaisse": "Thick", + "Fine": "Fine", + "Forte": "Forte", + "Galerie ajoutée": "Gallery added", + "Galerie effacée": "Erased gallery", + "Légende": "Caption", + "Légendes": "Legends", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "Mask", + "Mode plein écran automatique": "Automatic full mode", + "Opacité au survol": "Opacity in overflight", + "Options de configuration": "Configuration options", + "Proportionnelle": "Proportional", + "Supprimer cette galerie ?": "Remove this gallery?", + "Tri des images": "Sorting images", + "Très Discrète": "Very discreet", + "Très fine": "Very fine", + "Très forte": "Very strong", + "Très épaisse": "Very thick", + "Vignettes": "Vignettes", + "Ajouter une galerie": "Add a gallery", + "Éditer une galerie": "Edit a gallery", + "Effacer une galerie": "Delete a gallery", + "Options des galeries": "Gallery options", + "Thème des galeries": "Gallery themes" +} \ No newline at end of file diff --git a/geogallery/i18n/es.json b/geogallery/i18n/es.json new file mode 100644 index 0000000..84c7aa4 --- /dev/null +++ b/geogallery/i18n/es.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Mostrar contenido de página con galería", + "Alignement du bouton de retour": "Alineación del botón Atrás", + "Alphabétique ": "Alfabético", + "Alphabétique inverse": "Alfabético inverso", + "Au-dessus": "Encima", + "Aucune galerie": "Sin galería", + "Bordure": "Bordillo", + "Configuration de la galerie %s ": "Configuración de la galería %s ", + "Configuration des galeries": "Configuración de la galería", + "Couleur de la bordure": "Color del bordillo", + "Couverture": "Portada ", + "Discrète": "Discreto", + "Distribué avec marges": "Distribuido con márgenes", + "Distribué sans marge": "Distribuido sin margen", + "Dossier cible": "Carpeta de destino", + "En dessous": "Debajo", + "Epaisse": "grueso", + "Fine": "Fino", + "Forte": "Fuerte", + "Galerie ajoutée": "Galería añadida", + "Galerie effacée": "Galería eliminada", + "Légende": "Pie", + "Légendes": "Leyendas", + "Manuel": "Manual", + "Marge": "Margen", + "Masqué": "Máscara", + "Mode plein écran automatique": "Modo automático de pantalla completa", + "Opacité au survol": "Opacidad de desplazamiento", + "Options de configuration": "Opciones de configuración", + "Proportionnelle": "Proporcional", + "Supprimer cette galerie ?": "¿Borrar esta galería?", + "Tri des images": "Ordenar imágenes", + "Très Discrète": "Muy discreto", + "Très fine": "Muy fino", + "Très forte": "Muy fuerte", + "Très épaisse": "Muy grueso", + "Vignettes": "Viñetas", + "Ajouter une galerie": "Agregar una galería", + "Éditer une galerie": "Editar una galería", + "Effacer une galerie": "Borrar una galería", + "Options des galeries": "Opciones de galerías", + "Thème des galeries": "Temas de galerías" +} \ No newline at end of file diff --git a/geogallery/i18n/fr_FR.json b/geogallery/i18n/fr_FR.json new file mode 100644 index 0000000..bfc0e0f --- /dev/null +++ b/geogallery/i18n/fr_FR.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "", + "Alignement du bouton de retour": "", + "Alphabétique ": "", + "Alphabétique inverse": "", + "Au-dessus": "", + "Aucune galerie": "", + "Bordure": "", + "Configuration de la galerie %s ": "", + "Configuration des galeries": "", + "Couleur de la bordure": "", + "Couverture": "", + "Discrète": "", + "Distribué avec marges": "", + "Distribué sans marge": "", + "Dossier cible": "", + "En dessous": "", + "Epaisse": "", + "Fine": "", + "Forte": "", + "Galerie ajoutée": "", + "Galerie effacée": "", + "Légende": "", + "Légendes": "", + "Manuel": "", + "Marge": "", + "Masqué": "", + "Mode plein écran automatique": "", + "Opacité au survol": "", + "Options de configuration": "", + "Proportionnelle": "", + "Supprimer cette galerie ?": "", + "Tri des images": "", + "Très Discrète": "", + "Très fine": "", + "Très forte": "", + "Très épaisse": "", + "Vignettes": "", + "Ajouter une galerie": "", + "Éditer une galerie": "", + "Effacer une galerie": "", + "Options des galeries": "", + "Thème des galeries": "" +} \ No newline at end of file diff --git a/geogallery/i18n/gr_GR.json b/geogallery/i18n/gr_GR.json new file mode 100644 index 0000000..0769106 --- /dev/null +++ b/geogallery/i18n/gr_GR.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Εμφάνιση περιεχομένου σελίδας με γκαλερί", + "Alignement du bouton de retour": "Ευθυγράμμιση κουμπιού πίσω", + "Alphabétique ": "Αλφαβητική Ταξινόμηση", + "Alphabétique inverse": "Αντίστροφη αλφαβητική", + "Au-dessus": "Πάνω", + "Aucune galerie": "Δεν υπάρχει συλλογή εικόνων", + "Bordure": "κάδρο γύρω", + "Configuration de la galerie %s ": "Διαμόρφωση της γκαλερί %s ", + "Configuration des galeries": "Διαμόρφωση γκαλερί", + "Couleur de la bordure": "Χρώμα γραμμής", + "Couverture": "Κάλυψη ", + "Discrète": "διακριτικό", + "Distribué avec marges": "Διανομή με περιθώρια", + "Distribué sans marge": "Διανομή χωρίς περιθώριο", + "Dossier cible": "Φάκελος στόχος", + "En dessous": "Κάτω", + "Epaisse": "Παχιά γραμμή", + "Fine": "Λεπτή γραμμή ", + "Forte": "Ισχυρή αδιαφάνεια", + "Galerie ajoutée": "Προστέθηκε γκαλερί", + "Galerie effacée": "Γκαλερί διαγράφηκε", + "Légende": "Λεζάντα εικόνας", + "Légendes": "", + "Manuel": "Χειροκίνητη ", + "Marge": "Περιθώριο", + "Masqué": "κρυμμένο", + "Mode plein écran automatique": "Αυτόματη λειτουργία πλήρους οθόνης", + "Opacité au survol": "Αδιαφάνεια στο mouse-over", + "Options de configuration": "Επιλογές διαμόρφωσης", + "Proportionnelle": "Αναλογική", + "Supprimer cette galerie ?": "", + "Tri des images": "Ταξινόμηση εικόνων", + "Très Discrète": "Πολύ διακριτικό", + "Très fine": "Πολύ λεπτή γραμμή ", + "Très forte": "Πολύ Ισχυρή αδιαφάνεια", + "Très épaisse": "πολύ παχιά γραμμή", + "Vignettes": "", + "Ajouter une galerie": "Προσθήκη συλλογής", + "Éditer une galerie": "Επεξεργασία συλλογής", + "Effacer une galerie": "Διαγραφή συλλογής", + "Options des galeries": "Επιλογές συλλογών", + "Thème des galeries": "Θέματα συλλογών" +} \ No newline at end of file diff --git a/geogallery/i18n/it.json b/geogallery/i18n/it.json new file mode 100644 index 0000000..d3f948f --- /dev/null +++ b/geogallery/i18n/it.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Mostra il contenuto della pagina con la galleria", + "Alignement du bouton de retour": "Allineamento del pulsante di ritorno", + "Alphabétique ": "Alfabetico", + "Alphabétique inverse": "Alfabetico inverso", + "Au-dessus": "Al di sopra", + "Aucune galerie": "Nessuna galleria", + "Bordure": "Bordo", + "Configuration de la galerie %s ": "Configurazione della galleria %s ", + "Configuration des galeries": "Configurazione di Galler", + "Couleur de la bordure": "Colore del bordo", + "Couverture": "Copertina", + "Discrète": "Discreto", + "Distribué avec marges": "Distribuito con margini", + "Distribué sans marge": "Distribuito senza margine", + "Dossier cible": "File di destinazione", + "En dessous": "Qui di seguito", + "Epaisse": "Spesso", + "Fine": "Bene", + "Forte": "Forte", + "Galerie ajoutée": "Galleria aggiunta", + "Galerie effacée": "Galleria cancellata", + "Légende": "Didascalia", + "Légendes": "Leggende", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "Maschera", + "Mode plein écran automatique": "Modalità completa automatica", + "Opacité au survol": "Opacità in luce eccessiva", + "Options de configuration": "Opzioni di configurazione", + "Proportionnelle": "Proporzionale", + "Supprimer cette galerie ?": "Rimuovere questa galleria?", + "Tri des images": "Ordinamento delle immagini", + "Très Discrète": "Molto discreto", + "Très fine": "Molto bene", + "Très forte": "Molto forte", + "Très épaisse": "Molto spesso", + "Vignettes": "Vignette", + "Ajouter une galerie": "Aggiungi una galleria", + "Éditer une galerie": "Modifica una galleria", + "Effacer une galerie": "Cancella una galleria", + "Options des galeries": "Opzioni delle gallerie", + "Thème des galeries": "Temi delle gallerie" +} \ No newline at end of file diff --git a/geogallery/i18n/pt_PT.json b/geogallery/i18n/pt_PT.json new file mode 100644 index 0000000..3c5ead3 --- /dev/null +++ b/geogallery/i18n/pt_PT.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Mostre o conteúdo da página com a galeria", + "Alignement du bouton de retour": "Retornar alinhamento do botão", + "Alphabétique ": "Alfabético", + "Alphabétique inverse": "Alfabético reverso", + "Au-dessus": "Acima de", + "Aucune galerie": "Sem galeria", + "Bordure": "Fronteira", + "Configuration de la galerie %s ": "Configuração da galeria %s ", + "Configuration des galeries": "Configuração de Galler", + "Couleur de la bordure": "Cor da borda", + "Couverture": "Capa", + "Discrète": "Discreto", + "Distribué avec marges": "Distribuído com margens", + "Distribué sans marge": "Distribuído sem margem", + "Dossier cible": "Arquivo de destino", + "En dessous": "Abaixo de", + "Epaisse": "Espesso", + "Fine": "Multar", + "Forte": "Forte", + "Galerie ajoutée": "Galeria adicionada", + "Galerie effacée": "Galeria apagada", + "Légende": "Legenda", + "Légendes": "Legendas", + "Manuel": "Manuel", + "Marge": "Marge", + "Masqué": "mascarar", + "Mode plein écran automatique": "Modo completo automático", + "Opacité au survol": "Opacidade em Overflight", + "Options de configuration": "", + "Proportionnelle": "Proporcional", + "Supprimer cette galerie ?": "Remover esta galeria?", + "Tri des images": "Classificando imagens", + "Très Discrète": "Muito discreto", + "Très fine": "Muito bem", + "Très forte": "Muito forte", + "Très épaisse": "Muito espesso", + "Vignettes": "Vinhetas", + "Ajouter une galerie": "Adicionar uma galeria", + "Éditer une galerie": "Editar uma galeria", + "Effacer une galerie": "Apagar uma galeria", + "Options des galeries": "Opções de galerias", + "Thème des galeries": "Temas de galerias" +} \ No newline at end of file diff --git a/geogallery/i18n/tr_TR.json b/geogallery/i18n/tr_TR.json new file mode 100644 index 0000000..3af9e05 --- /dev/null +++ b/geogallery/i18n/tr_TR.json @@ -0,0 +1,44 @@ +{ + "Afficher le contenu de la page avec la galerie": "Sayfa içeriğini galeri ile görüntüle", + "Alignement du bouton de retour": "Geri düğmesi hizalaması", + "Alphabétique ": "Alfabetik", + "Alphabétique inverse": "Ters alfabetik", + "Au-dessus": "Üstünde", + "Aucune galerie": "Galeri Yok", + "Bordure": "Çerçeve", + "Configuration de la galerie %s ": "%s galeri yapılandırması", + "Configuration des galeries": "Galerilerin yapılandırması", + "Couleur de la bordure": "Çerçeve rengi", + "Couverture": "Kapak", + "Discrète": "Silik", + "Distribué avec marges": "Kenar boşluklarıyla dağıtıldı", + "Distribué sans marge": "Marjsız dağıtıldı", + "Dossier cible": "Hedef klasör", + "En dessous": "Altında", + "Epaisse": "Kalın", + "Fine": "İnce", + "Forte": "Güçlü", + "Galerie ajoutée": "Galeri eklendi", + "Galerie effacée": "Galeri silindi", + "Légende": "Başlık", + "Légendes": "Başlıklar", + "Manuel": "Manuel", + "Marge": "Kenar boşluğu", + "Masqué": "Gizli", + "Mode plein écran automatique": "Otomatik tam ekran modu", + "Opacité au survol": "Hover opaklığı", + "Options de configuration": "Yapılandırma seçenekleri", + "Proportionnelle": "Orantılı", + "Supprimer cette galerie ?": "Bu galeri silinsin mi?", + "Tri des images": "Resimleri sıralama", + "Très Discrète": "Çok silik", + "Très fine": "Çok ince", + "Très forte": "Çok güçlü", + "Très épaisse": "Çok kalın", + "Vignettes": "Küçük resim", + "Ajouter une galerie": "Galeri Ekle", + "Éditer une galerie": "Galeri Düzenle", + "Effacer une galerie": "Galeri Sil", + "Options des galeries": "Galeri Seçenekleri", + "Thème des galeries": "Galeri Temaları" +} \ No newline at end of file diff --git a/geogallery/profil/main/add.inc.php b/geogallery/profil/main/add.inc.php new file mode 100644 index 0000000..6d865e9 --- /dev/null +++ b/geogallery/profil/main/add.inc.php @@ -0,0 +1,12 @@ + $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN), + 'option' => $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN), + 'theme' => $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN), + 'config' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN) || + $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN) +]; \ No newline at end of file diff --git a/geogallery/profil/main/edit.inc.php b/geogallery/profil/main/edit.inc.php new file mode 100644 index 0000000..0a94afe --- /dev/null +++ b/geogallery/profil/main/edit.inc.php @@ -0,0 +1,12 @@ + $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN), + 'edit' => $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN), + 'delete' => $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN), + 'option' => $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN), + 'theme' => $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN), + 'config' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN) || + $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN) +]; \ No newline at end of file diff --git a/geogallery/profil/view/add.inc.php b/geogallery/profil/view/add.inc.php new file mode 100644 index 0000000..7963bfe --- /dev/null +++ b/geogallery/profil/view/add.inc.php @@ -0,0 +1,28 @@ +
+
+
+

+ +

+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/geogallery/profil/view/edit.inc.php b/geogallery/profil/view/edit.inc.php new file mode 100644 index 0000000..995c1b4 --- /dev/null +++ b/geogallery/profil/view/edit.inc.php @@ -0,0 +1,38 @@ +
+
+
+

+ +

+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'add']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'edit']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'delete']) + ]); ?> +
+
+
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'option']) + ]); ?> +
+
+ $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'theme']) + ]); ?> +
+
+
+
+
\ No newline at end of file diff --git a/geogallery/ressource/defaultdata.php b/geogallery/ressource/defaultdata.php new file mode 100644 index 0000000..b0fb159 --- /dev/null +++ b/geogallery/ressource/defaultdata.php @@ -0,0 +1,25 @@ + 'center', + 'thumbWidth' => '18em', + 'thumbHeight' => '15em', + 'thumbMargin' => '.5em', + 'thumbBorder' => '.1em', + 'thumbOpacity' => '.7', + 'thumbBorderColor' => 'rgba(221, 221, 221, 1)', + 'thumbRadius' => '.3em', + 'thumbShadows' => '1px 1px 10px', + 'thumbShadowsColor' => 'rgba(125, 125, 125, 1)', + 'legendHeight' => '.375em', + 'legendAlign' => 'center', + 'legendTextColor' => 'rgba(255, 255, 255, 1)', + 'legendBgColor' => 'rgba(0, 0, 0, .6)' + ]; + public static $defaultData = [ + "showUniqueGallery" => false, + "backPosition" => "top", + "backAlign" => "center", + 'versionData' => '3.0' + ]; +} diff --git a/geogallery/ressource/theme.css b/geogallery/ressource/theme.css new file mode 100644 index 0000000..c0608f9 --- /dev/null +++ b/geogallery/ressource/theme.css @@ -0,0 +1,52 @@ +.galleryPicture, +.galleryGalleryPicture { + display: block; + border: var(--thumbBorder) solid var(--thumbBorderColor); + height: var(--thumbHeight); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + position: relative; + -webkit-transition: opacity .3s ease-out; + transition: opacity .3s ease-out; + border-radius: var(--thumbRadius); + box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); + -moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor); +} +.galleryPicture:hover, +.galleryGalleryPicture:hover { + opacity: var(--thumbOpacity); +} +.galleryName, +.galleryGalleryName { + position: absolute; + left: 0; + right: 0; + bottom: 0; + border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2); + padding: var(--legendHeight); + background: var(--legendBgColor); + color: var(--legendTextColor); + text-align: var(--legendAlign); +} + +.galleryRow { + display: flex; + flex-wrap: wrap; + justify-content: var(--thumbAlign); +} + +.colPicture { + width : var(--thumbWidth); + max-width: 50%; + padding: var(--thumbMargin); + } + + @media (max-width: 432px) { + .colPicture { + width: 90%; + max-width: 90%; + margin: 0.5em; + } + } \ No newline at end of file diff --git a/geogallery/ressource/vartheme.css b/geogallery/ressource/vartheme.css new file mode 100644 index 0000000..bd665d4 --- /dev/null +++ b/geogallery/ressource/vartheme.css @@ -0,0 +1,27 @@ +.galleryRow { + --thumbAlign: #thumbAlign#; +} +.colPicture { + --thumbWidth: #thumbWidth#; + --thumbMargin: #thumbMargin#; +} +.galleryPicture, +.galleryGalleryPicture { + --thumbHeight: #thumbHeight#; + --thumbBorder: #thumbBorder#; + --thumbBorderColor: #thumbBorderColor#; + --thumbRadius: #thumbRadius#; + --thumbShadows: #thumbShadows#; + --thumbShadowsColor: #thumbShadowsColor#; +} +.galleryName, +.galleryGalleryName { + --legendHeight: #legendHeight#; + --legendAlign: #legendAlign#; + --legendTextColor: #legendTextColor#; + --legendBgColor: #legendBgColor#; +} +.galleryPicture:hover, +.galleryGalleryPicture:hover { + --thumbOpacity: #thumbOpacity#; +} diff --git a/geogallery/vendor/leaflet/images/layers-2x.png b/geogallery/vendor/leaflet/images/layers-2x.png new file mode 100644 index 0000000..200c333 Binary files /dev/null and b/geogallery/vendor/leaflet/images/layers-2x.png differ diff --git a/geogallery/vendor/leaflet/images/layers.png b/geogallery/vendor/leaflet/images/layers.png new file mode 100644 index 0000000..1a72e57 Binary files /dev/null and b/geogallery/vendor/leaflet/images/layers.png differ diff --git a/geogallery/vendor/leaflet/images/marker-icon-2x.png b/geogallery/vendor/leaflet/images/marker-icon-2x.png new file mode 100644 index 0000000..88f9e50 Binary files /dev/null and b/geogallery/vendor/leaflet/images/marker-icon-2x.png differ diff --git a/geogallery/vendor/leaflet/images/marker-icon.png b/geogallery/vendor/leaflet/images/marker-icon.png new file mode 100644 index 0000000..950edf2 Binary files /dev/null and b/geogallery/vendor/leaflet/images/marker-icon.png differ diff --git a/geogallery/vendor/leaflet/images/marker-shadow.png b/geogallery/vendor/leaflet/images/marker-shadow.png new file mode 100644 index 0000000..9fd2979 Binary files /dev/null and b/geogallery/vendor/leaflet/images/marker-shadow.png differ diff --git a/geogallery/vendor/leaflet/inc.json b/geogallery/vendor/leaflet/inc.json new file mode 100644 index 0000000..c0b4a3b --- /dev/null +++ b/geogallery/vendor/leaflet/inc.json @@ -0,0 +1,4 @@ +[ + "leaflet.js", + "leaflet.css" +] \ No newline at end of file diff --git a/geogallery/vendor/leaflet/leaflet.css b/geogallery/vendor/leaflet/leaflet.css new file mode 100644 index 0000000..9ade8dc --- /dev/null +++ b/geogallery/vendor/leaflet/leaflet.css @@ -0,0 +1,661 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Prevents IE11 from highlighting tiles in blue */ +.leaflet-tile::selection { + background: transparent; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg { + max-width: none !important; + max-height: none !important; + } +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile { + max-width: none !important; + max-height: none !important; + width: auto; + padding: 0; + } + +.leaflet-container img.leaflet-tile { + /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ + mix-blend-mode: plus-lighter; +} + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +svg.leaflet-zoom-animated { + will-change: transform; +} + +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive, +svg.leaflet-image-layer.leaflet-interactive path { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline-offset: 1px; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + font-size: 12px; + font-size: 0.75rem; + line-height: 1.5; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover, +.leaflet-bar a:focus { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + font-size: 13px; + font-size: 1.08333em; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */ + background-image: url(images/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.8); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + line-height: 1.4; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover, +.leaflet-control-attribution a:focus { + text-decoration: underline; + } +.leaflet-attribution-flag { + display: inline !important; + vertical-align: baseline !important; + width: 1em; + height: 0.6669em; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + white-space: nowrap; + -moz-box-sizing: border-box; + box-sizing: border-box; + background: rgba(255, 255, 255, 0.8); + text-shadow: 1px 1px #fff; + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 24px 13px 20px; + line-height: 1.3; + font-size: 13px; + font-size: 1.08333em; + min-height: 1px; + } +.leaflet-popup-content p { + margin: 17px 0; + margin: 1.3em 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-top: -1px; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + pointer-events: auto; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + border: none; + text-align: center; + width: 24px; + height: 24px; + font: 16px/24px Tahoma, Verdana, sans-serif; + color: #757575; + text-decoration: none; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover, +.leaflet-container a.leaflet-popup-close-button:focus { + color: #585858; + } +.leaflet-popup-scrolled { + overflow: auto; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + -ms-zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-interactive { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } + +/* Printing */ + +@media print { + /* Prevent printers from removing background-images of controls. */ + .leaflet-control { + -webkit-print-color-adjust: exact; + print-color-adjust: exact; + } + } diff --git a/geogallery/vendor/leaflet/leaflet.js b/geogallery/vendor/leaflet/leaflet.js new file mode 100644 index 0000000..a3bf693 --- /dev/null +++ b/geogallery/vendor/leaflet/leaflet.js @@ -0,0 +1,6 @@ +/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:Ot,touch:Bt,touchNative:At,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Wt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ft=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&O(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),u)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=F(e),o=0,s=n.length;othis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new B(t)}var B=et.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;se.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,e=(this._preventClick=!0,S(t,"click",O),this.expand(),this);setTimeout(function(){k(t,"click",O),e._preventClick=!1})}})),qe=B.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ge=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))}),B.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280'+(b.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ke).addTo(this)}),B.Layers=Ve,B.Zoom=qe,B.Scale=Ge,B.Attribution=Ke,Ue.layers=function(t,e,i){return new Ve(t,e,i)},Ue.zoom=function(t){return new qe(t)},Ue.scale=function(t){return new Ge(t)},Ue.attribution=function(t){return new Ke(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Ye=b.touch?"touchstart mousedown":"mousedown",Xe=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xe._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xe._dragging===this&&this.finishDrag():Xe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xe._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),o=n);oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ri(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}});var wi=ci.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;es.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([r,a]))))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ci||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof fi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Di=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Vi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Vi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){ge(t._container)}},qi=b.vml?Vi:ct,Gi=Wi.extend({_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=qi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Ki(t){return b.svg||b.vml?new Gi(t):null}b.vml&&Gi.include(zt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Ki(t)}});var Yi=xi.extend({initialize:function(t,e){xi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=qi,Gi.pointsToPath=dt,wi.geometryToLayer=bi,wi.coordsToLatLng=Li,wi.coordsToLatLngs=Ti,wi.latLngToCoords=Mi,wi.latLngsToCoords=zi,wi.getFeature=Ci,wi.asFeature=Zi,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,n=(n+e+i)%t-e-i,t=Math.abs(o+i)e.getMaxZoom()&&1 + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + + + +/** NE PAS EFFACER +* admin.css +*/ \ No newline at end of file diff --git a/geogallery/view/add/add.js.php b/geogallery/view/add/add.js.php new file mode 100644 index 0000000..e4ea25d --- /dev/null +++ b/geogallery/view/add/add.js.php @@ -0,0 +1,53 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2024, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + +/** + * Liste des dossiers + */ +var oldResult = []; +var directoryDOM = $("#galleryAddDirectory"); +var directoryOldDOM = $("#galleryAddDirectoryOld"); +function dirs() { + $.ajax({ + type: "POST", + url: "getUrl(0); ?>/dirs", + success: function(result) { + if($(result).not(oldResult).length !== 0 || $(oldResult).not(result).length !== 0) { + directoryDOM.empty(); + for(var i = 0; i < result.length; i++) { + directoryDOM.append(function(i) { + var option = $("