Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,48 @@

## Unreleased

## 1.8
## release 1.9
- NEW : DA025083 - Création d'un hook listInCSVFooterContext permettant à des modules externes d'utiliser ListInCSV. - *11/06/2024* - 1.9.0

## release 1.8
- FIX : DA024994 - Problème de sélection sur la liste des demandes de congés (car elle contient des valeurs dans des inputs) - *21/05/2024* - 1.8.4
- FIX : object test - *25/03/2024* - 1.8.3
- FIX : Compat agefodd session onglet participant sur tableau stagiaire *20/03/2024* - 1.8.2
- FIX : Module logo Image *18/12/2023* - 1.8.1
- FIX : Compat v19 et php8.2 *07/10/2023* - 1.8.0

## 1.7
## release 1.7

- NEW : Ajout de la possibilité d'exporter la liste des prix clients *07/10/2023* - 1.7.0

## 1.6
## release 1.6

- NEW : Ajout icône listincsv sur objets référents produit et tiers *07/02/2023* - 1.6.0

## 1.5
## release 1.5

- NEW : Ajout de la class TechATM pour l'affichage de la page "A propos" *10/05/2022* 1.15.0

## 1.4
## release 1.4

- FIX: Family name - *02/06/2022* - 1.4.3
- FIX: Delete Trigger - *02/06/2022* - 1.4.2
- FIX: context detection - *15/03/2022* - 1.4.1
- NEW: Include Dolibarr V13 stock to date - *28/02/2022* - 1.4.0

## 1.3
## release 1.3

- FIX: Appel de `call_trigger()` sur un non-objet - *08/10/2021* - 1.3.1
- NEW: Déclenchement d'un trigger sur export d'un fichier avec listincsv - *19/05/2021* - 1.3.0

## 1.2
## release 1.2

- FIX: La liste ne s'exporte plus - *20/05/2021* - 1.2.4
- FIX: Les champs de type "case à cocher" ne sont pas exportés - *17/05/2021* - 1.2.3
- FIX: Suppression du dossier Box ainsi que tu fichier box *11/05/2021* - 1.2.2
- FIX: $_SESSION devient newToken() *11/05/2021* - 1.2.1
- NEW: Déplacement du code qui crée le boutton vert "CSV" pour utilisation dans des modules externes avec un contexte ajax *06/05/2021* - 1.2.0

## 1.1
## release 1.1

- NEW: Ajout d'une gestion de récupération des informations via un autre paramètre que l'action du formulaire le plus proche *06/05/2021* - 1.1.0
4 changes: 2 additions & 2 deletions backport/v19/core/class/commonhookactions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
*/


if (file_exists(DOL_DOCUMENT_ROOT . '/htdocs/core/class/commonhookactions.class.php')){
if (file_exists(DOL_DOCUMENT_ROOT . '/core/class/commonhookactions.class.php')){

require_once DOL_DOCUMENT_ROOT . '/htdocs/core/class/commonhookactions.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/commonhookactions.class.php';
/**
* Parent class of all other hook actions classes
*/
Expand Down
18 changes: 16 additions & 2 deletions class/actions_listincsv.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function doActions($parameters, &$object, &$action, $hookmanager) {

global $db, $user;

if(GETPOSTISSET('exportlistincsv', 'bool') && method_exists($object, 'call_trigger')) {
if(GETPOSTISSET('exportlistincsv', 'bool') && is_object($object) && method_exists($object, 'call_trigger')) {
$object->call_trigger('LISTINCSV_EXPORT_FILE_'.strtoupper($object->element), $user);
}

Expand Down Expand Up @@ -103,6 +103,16 @@ function printCommonFooter($parameters, &$object, &$action, $hookmanager)
if(empty($context_list)) {
$context_list = preg_grep('/(thirdpartycustomerprice)/i', $TContext);
}
if(empty($context_list)) {
$context_list = preg_grep('/(agefoddsessionsubscribers)/i', $TContext);
}

// Permettre à d'autres modules externes d'utiliser listInCSV
$parameters['context_list'] = &$context_list;
$reshook = $hookmanager->executeHooks('listInCSVFooterContext', $parameters);
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}

if (!empty($context_list))
{
Expand All @@ -127,11 +137,15 @@ function printCommonFooter($parameters, &$object, &$action, $hookmanager)

$(document).ready(function() {
<?php
// Case fo tesk list into project
// Case for task list into project
if (strpos($parameters['context'], 'projecttasklist') !== false) {
?>
$('#id-right > form#searchFormList div.titre').first().append('<?php echo $download; ?>'); // Il peut y avoir plusieurs titre dans la page
<?php
} else if (strpos($parameters['context'], 'agefoddsessionsubscribers') !== false) {
?>
$('div.fiche div.titre').eq(1).append('<?php echo $download; ?>'); // Il peut y avoir plusieurs titre dans la page
<?php
} else {
?>
if(typeof $('div.fiche div.titre').first().val() !== 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion config.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
elseif(!defined('INC_FROM_DOLIBARR')) {
include($dir."main.inc.php");
} else {
global $dolibarr_main_db_host, $dolibarr_main_db_name, $dolibarr_main_db_user, $dolibarr_main_db_pass;
global $dolibarr_main_db_host, $dolibarr_main_db_name, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_type;
}

if(!defined('DB_HOST')) {
Expand Down
4 changes: 2 additions & 2 deletions core/modules/modListInCSV.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function __construct($db)
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
$this->description = "ListInCSV permet d'exporter en CSV une liste Dolibarr telle qu'elle apparaît à l'écran.";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = '1.8.0';
$this->version = '1.9.0';

// Url to the file with your last numberversion of this module
require_once __DIR__ . '/../../class/techatm.class.php';
Expand All @@ -73,7 +73,7 @@ function __construct($db)
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
$this->picto='listincsv@listincsv';
$this->picto='modulelistincsv@listincsv';

// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
// for default path (eg: /listincsv/core/xxxxx) (0=disable, 1=enable)
Expand Down
90 changes: 90 additions & 0 deletions img/logo list in csv.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/object_modulelistincsv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions js/listincsv.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ function exportTableToCSV($table, filename) {
// Fix mails tronqués dans les listes par dol_trunc dans la fonction dol_print_email
link=$col.find('a')[0].href;
text = link.substr(7);
} else if ($col.find('input').length > 0 && $col.find('input').prop('type') === 'text') {
// Fix DA024994 liste avec des inputs
text=$col.find('input').val();
} else text = $col.text().trim();

// Spécifique pour "nettoyer" les données
Expand All @@ -115,6 +118,7 @@ function exportTableToCSV($table, filename) {
.split(tmpRowDelim).join(rowDelim)
.split(tmpColDelim).join(colDelim) + '"';


// Deliberate 'false', see comment below
if (false && window.navigator.msSaveBlob) {

Expand Down
13 changes: 13 additions & 0 deletions langs/es_MX/listincsv.lang
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Module104856Name = Lista en CSV
Module104856Desc = Agrega un ícono que le permite descargar listas en formato CSV

ATMAbout = Este módulo fue desarrollado por <a href="https://www.atm-consulting.fr" target="_blank">ATM Consulting</a><br>Puede encontrar la documentación en nuestro <a href = "https://wiki.atm-consulting.fr/index.php/Accueil" target="_blank">wiki</a><br><br>Para cualquier pregunta técnica o comentario, contáctenos en <a href= "mailto:[email protected]">[email protected]</a><br><br>Para cualquier pregunta comercial, contáctenos en <a href="mailto:contact@atm -consulting. fr">[email protected]</a> o +33 9 77 19 50 70<br><br>Encuentre nuestros otros módulos en <a href="https://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=atm&submit_search=Rechercher" target="_blank">Dolistore</a>

ListInCSVSetup = Configuración del módulo Lista en CSV
ListInCSVAbout = Acerca del módulo Lista en CSV

NoSetupAvailable = No es necesaria ninguna configuración. Ahora está disponible un ícono junto al título de cada lista que le permite descargarla en un archivo CSV.

FileGenerationInProgress = Generación del archivo CSV en curso.
LISTINCSVExport=Permitir exportación de listas en CSV
LISTINCSV_DELETESPACEFROMNUMBER=Eliminar espacios contenidos en números