<html>
<head>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<link href="https://nightly.datatables.net/css/dataTables.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://nightly.datatables.net/js/dataTables.js"></script>
<link href="https://cdn.datatables.net/select/2.0.1/css/select.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/select/2.0.1/js/dataTables.select.js"></script>
<link href="https://cdn.datatables.net/searchpanes/2.3.1/css/searchPanes.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/searchpanes/2.3.1/js/dataTables.searchPanes.js"></script>
<link href="https://cdn.datatables.net/rowgroup/1.5.0/css/rowGroup.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/rowgroup/1.5.0/js/dataTables.rowGroup.js"></script>
<link href="https://cdn.datatables.net/responsive/3.0.2/css/responsive.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/responsive/3.0.2/js/dataTables.responsive.js"></script>
<link href="https://cdn.datatables.net/buttons/3.0.2/css/buttons.dataTables.css" rel="stylesheet" type="text/css" />
<script src="https://cdn.datatables.net/buttons/3.0.2/js/dataTables.buttons.js"></script>
<meta charset=utf-8 />
<title>DataTables - JS Bin</title>
</head>
<body>
<table id="liste_personnes" class="table is-hoverable nowrap font95rem">
<thead>
<tr class="thead-light">
<th class="icone"><!-- details --></th>
<th class="icone"><!-- ajouter personne --></th>
<th>pp</th>
<th>société</th>
<th>société / nom</th>
<th>fonction</th>
<th>groupe</th>
<th>type</th>
<th>ville</th>
<th>pays</th>
<th>adresse</th>
<th>tél / portable</th>
<th class="icone">email / site</th>
<th>chef de produit</th>
<th class="none">secteur d'activité</th>
<th class="filtre">département</th>
</tr>
</thead>
</table>
</body>
</html>
body {
font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
}
// Personnal JS params & functions
// REGLAGES PAR DEFAUT
// le code ci-dessous permet de modifier l'apparence de la recherche
DataTable.ext.classes.search.input = "input";
// correction de la CSS pour les boutons (qui contient field par défaut et provoque un décalage vertical avec les autres éléments)
DataTable.Buttons.defaults.dom.container.className = 'dt-buttons is-grouped';
// pour ne pas avoir la 3ème option de tri par défaut (valeurs vides)
// https://datatables.net/reference/option/columns.orderSequence
DataTable.defaults.column.orderSequence = ['asc', 'desc'];
DataTable.ext.errMode = 'throw';
Object.assign(DataTable.defaults, {
//language: { url: '//cdn.datatables.net/plug-ins/2.1.3/i18n/fr-FR.json'},
lengthMenu: [5, 10, 25, 50, 100, { label: 'Tout', value: -1 }],
pageLength: 25,
caption: '<span class="font85rem has-text-grey">Cliquer sur la ligne ou sur le <span class="mx-1">▶</span> pour afficher des informations complémentaires</span>',
processing: true,
layout: {
top1: 'searchPanes',
topStart: null,
topEnd: null,
top: [
// left
'pageLength',
// middle
{ buttons: ['copy', 'csv', 'excel', 'pdf', 'print'] },
// right
{ search: { text: '_INPUT_', placeholder: 'Rechercher dans la liste'} }
],
bottomStart: 'info',
bottomEnd: 'paging'
},
initComplete: function () {
$('nav.pagination').addClass('is-small');
$('div.dtsp-panesContainer button').addClass('is-small');
},
drawCallback: function (settings) {
$('nav.pagination').addClass('is-small');
},
});
function render_rub_multival( data, type, row ) {
if (type === 'display' || type === 'filter') {
var values = [];
for (i=0; i<data.length; i++) {
values.push(data[i].libelle);
}
return values.join('<br>');
}
if ( type === 'sort' ) {
var size = data.length;
if (size !== 0) {
return data[0]['libelle'];
}
}
return data;
}
function render_rub_multival_virgule( data, type, row ) {
if (type === 'display') {
var values = [];
for (i=0; i<data.length; i++) {
values.push(data[i].libelle);
}
return values.join(', ');
}
return data;
}
// DATA FOR THE TABLE
var dataSet = [
{
"__KEY": 28083,
"Num_P": 28083,
"Nom": "Test Case Company",
"Prenom": "",
"Civilite": "",
"Type_Personne": "Fournisseur",
"Fonction": "",
"Societe": "Test Case Company",
"CP_Avant": "75011",
"Ville": "Paris",
"Pays": "France",
"Pers_Physique": false,
"Adresse1": "75011 PARIS",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22237,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Company",
"adresseClean": "75011 PARIS",
"destination": "Test%20Case%20Company%2C%2075011%20PARIS",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"chefProduit": [],
"secteurActivite": []
},
{
"__KEY": 28084,
"Num_P": 28084,
"Nom": "Rowlands",
"Prenom": "Gena",
"Civilite": "Madame",
"Type_Personne": "Fournisseur",
"Fonction": "",
"Societe": "Test Case Company",
"CP_Avant": "75011",
"Ville": "Paris",
"Pays": "France",
"Pers_Physique": true,
"Adresse1": "75011 PARIS",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22238,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Company",
"adresseClean": "75011 PARIS",
"destination": "Test%20Case%20Company%2C%2075011%20PARIS",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"chefProduit": [],
"secteurActivite": []
},
{
"__KEY": 28085,
"Num_P": 28085,
"Nom": "Davis",
"Prenom": "geena",
"Civilite": "Madame",
"Type_Personne": "Fournisseur",
"Fonction": "",
"Societe": "Test Case Company",
"CP_Avant": "75011",
"Ville": "Paris",
"Pays": "France",
"Pers_Physique": true,
"Adresse1": "75011 PARIS",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22239,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Company",
"adresseClean": "75011 PARIS",
"destination": "Test%20Case%20Company%2C%2075011%20PARIS",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"chefProduit": [],
"secteurActivite": []
},
{
"__KEY": 28086,
"Num_P": 28086,
"Nom": "Test Case Organization",
"Prenom": "",
"Civilite": "",
"Type_Personne": "Prospect",
"Fonction": "",
"Societe": "Test Case Organization",
"CP_Avant": "",
"Ville": "",
"Pays": "Italie",
"Pers_Physique": false,
"Adresse1": "\rItalie",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22240,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "ITALIE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Organization",
"adresseClean": ", Italie",
"destination": "Test%20Case%20Organization%2C%20%2C%20Italie",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test1",
"Nature": 0,
"code": "test1",
"libelle": "Test Case Goodfellas"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Infographie",
"Nature": 1,
"libelle": "Infographie"
}
]
},
{
"__KEY": 28087,
"Num_P": 28087,
"Nom": "de Niro",
"Prenom": "Robert",
"Civilite": "Monsieur",
"Type_Personne": "Prospect",
"Fonction": "",
"Societe": "Test Case Organization",
"CP_Avant": "",
"Ville": "",
"Pays": "Italie",
"Pers_Physique": true,
"Adresse1": "\rItalie",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22241,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "ITALIE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Organization",
"adresseClean": ", Italie",
"destination": "Test%20Case%20Organization%2C%20%2C%20Italie",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test1",
"Nature": 0,
"code": "test1",
"libelle": "Test Case Goodfellas"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Infographie",
"Nature": 1,
"libelle": "Infographie"
}
]
},
{
"__KEY": 28088,
"Num_P": 28088,
"Nom": "Scorcese",
"Prenom": "Martin",
"Civilite": "",
"Type_Personne": "Prospect",
"Fonction": "",
"Societe": "Test Case Organization",
"CP_Avant": "",
"Ville": "",
"Pays": "Italie",
"Pers_Physique": true,
"Adresse1": "\rItalie",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22242,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "ITALIE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Organization",
"adresseClean": ", Italie",
"destination": "Test%20Case%20Organization%2C%20%2C%20Italie",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test1",
"Nature": 0,
"code": "test1",
"libelle": "Test Case Goodfellas"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Infographie",
"Nature": 1,
"libelle": "Infographie"
}
]
},
{
"__KEY": 28089,
"Num_P": 28089,
"Nom": "Test Case Cinéma Français",
"Prenom": "",
"Civilite": "",
"Type_Personne": "Client",
"Fonction": "",
"Societe": "Test Case Cinéma Français",
"CP_Avant": "69001",
"Ville": "LYON",
"Pays": "France",
"Pers_Physique": false,
"Adresse1": "69001 LYON",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22243,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Cinéma Français",
"adresseClean": "69001 LYON",
"destination": "Test%20Case%20Cin%C3%A9ma%20Fran%C3%A7ais%2C%2069001%20LYON",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test2",
"Nature": 0,
"code": "test2",
"libelle": "Test Case French Touch"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Film Cast",
"Nature": 1,
"libelle": "Film Cast"
}
]
},
{
"__KEY": 28090,
"Num_P": 28090,
"Nom": "Dupieux",
"Prenom": "Quentin",
"Civilite": "Monsieur",
"Type_Personne": "Client",
"Fonction": "",
"Societe": "Test Case Cinéma Français",
"CP_Avant": "69001",
"Ville": "LYON",
"Pays": "France",
"Pers_Physique": true,
"Adresse1": "69001 LYON",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22244,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Cinéma Français",
"adresseClean": "69001 LYON",
"destination": "Test%20Case%20Cin%C3%A9ma%20Fran%C3%A7ais%2C%2069001%20LYON",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test2",
"Nature": 0,
"code": "test2",
"libelle": "Test Case French Touch"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Film Cast",
"Nature": 1,
"libelle": "Film Cast"
}
]
},
{
"__KEY": 28091,
"Num_P": 28091,
"Nom": "Bacri",
"Prenom": "Jean-Pierre",
"Civilite": "Monsieur",
"Type_Personne": "Client",
"Fonction": "",
"Societe": "Test Case Cinéma Français",
"CP_Avant": "69001",
"Ville": "LYON",
"Pays": "France",
"Pers_Physique": true,
"Adresse1": "69001 LYON",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22245,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Cinéma Français",
"adresseClean": "69001 LYON",
"destination": "Test%20Case%20Cin%C3%A9ma%20Fran%C3%A7ais%2C%2069001%20LYON",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test2",
"Nature": 0,
"code": "test2",
"libelle": "Test Case French Touch"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Film Cast",
"Nature": 1,
"libelle": "Film Cast"
}
]
},
{
"__KEY": 28092,
"Num_P": 28092,
"Nom": "Jaoui",
"Prenom": "Agnes",
"Civilite": "",
"Type_Personne": "Client",
"Fonction": "",
"Societe": "Test Case Cinéma Français",
"CP_Avant": "69001",
"Ville": "LYON",
"Pays": "France",
"Pers_Physique": true,
"Adresse1": "69001 LYON",
"personnesRubriques": [],
"telephones": [],
"__recordNum": 22246,
"autorisation": 3,
"autorisation_test2": 3,
"pays": {
"uppercase": "FRANCE"
},
"tels": {
"telephone": "",
"email": "",
"portable": "",
"loginskype": "",
"siteweb": ""
},
"societeClean": "Test Case Cinéma Français",
"adresseClean": "69001 LYON",
"destination": "Test%20Case%20Cin%C3%A9ma%20Fran%C3%A7ais%2C%2069001%20LYON",
"aSupprimer": {
"libelle": "",
"Valeur_num": 0,
"Valeur_alpha": "",
"Valeur_date": "0000-00-00",
"mois": 0,
"annee": 0,
"jour": 0,
"semaine": 0,
"numIso": "",
"montantEntier": "0",
"montant": "0,00",
"num_ordre": 0
},
"groupe": {
"Code_rubrique": "GR",
"Valeur_alpha": "test2",
"Nature": 0,
"code": "test2",
"libelle": "Test Case French Touch"
},
"chefProduit": [
{
"Code_rubrique": "CP",
"Valeur_alpha": "AD",
"Nature": 0,
"code": "AD",
"libelle": "A définir"
}
],
"secteurActivite": [
{
"Code_rubrique": "SA",
"Valeur_alpha": "Film Cast",
"Nature": 1,
"libelle": "Film Cast"
}
]
}
];
// COLUMNS FOR THE TABLE
var contenuColonnes = [
{ data: null, // icone consultation fiche
render: function ( data, type, row ) {
return '<a rel="modal:open" href="AJAX/get/Personne/' + row['Num_P'] + '?tcom1=$4DTEXT(WEB_vt_interface)&onglet=details&template=personne/details/modal/personne"><i class="fa-solid fa-eye" title="Voir la fiche"></i></a>';
}
},
{ data: 'Pers_Physique', // icônes ajouter personne (sur personne morale uniquement)
render: function ( data, type, row ) {
var ajouter_personne = '';
var suppression_demandee = '';
if (data == false) {
ajouter_personne = '<a data-fancybox="formulaire" data-type="iframe" href="fb_ajouter_personne.htm&tcom1=$4DTEXT(WEB_vt_interface)&tcom20=' + row['Num_P'] + '"><i class="fa-solid fa-user-plus mr-1" title="Ajouter une personne"></i></a>';
}
if (row['aSupprimer']['libelle'] == 'oui') {
suppression_demandee = '<a href="seafilo0101?field01=1;300AS&op01=1&val01=oui&tcom1=$4DTEXT(WEB_vt_interface)"><i class="fa-regular fa-trash-can orange" title="Voir les fiches à supprimer"></i></a>';
}
return ajouter_personne + suppression_demandee ;
}
},
{ data: 'Pers_Physique', // retourne true / false
render: function ( data, type, row ) {
var catPersonne = '';
if (data == true) {
catPersonne = 'PERSONNE';
} else {
catPersonne = 'SOCIETE';
}
return catPersonne;
}
},
{ data: 'Societe'},
{ data: 'Pers_Physique', // personne morale ou physique : nom + prénom ne sont pas dans le même ordre + Type personne pour PM seulement
render: function ( data, type, row ) {
var nomComplet = '' ;
if (data == true) {
nomComplet = '<span class="ml-4">' + row['Nom'] + ' ' + row['Prenom'] + '</span>';
} else {
nomComplet = row['Prenom'] +' '+ row['Nom'];
}
return nomComplet;
}
},
{ data: 'Pers_Physique', // personne physique : fonction / personne morale : type personne
render: function ( data, type, row ) {
var value = '' ;
if (data == true) {
value = row['Fonction'];
}
return value;
}
},
{ data: 'groupe.libelle' },
{ data: 'Type_Personne' },
{ data: 'Ville',
render: function ( data, type, row ) {
var value = data;
if (row['Pays'].toLowerCase() == 'france') {
value = value + ' (' + row['CP_Avant'].substring(0, 2) + ')';
}
return value;
}
},
{ data: 'pays.uppercase' },
{ data: 'destination', // google maps
render: function ( data, type, row ) {
var itineraire_modaleJS = '<a rel="modal:open" href="AJAX/get/Personne/' + row['Num_P'] + '?template=personne/details/modal/googleMaps_itineraireJS"><i class="fa-solid fa-route fa-lg px-1 goldenrod" title="Itinéraire & plan"></i></a>';
var adresse = '<a rel="modal:open" href="AJAX/get/Personne/' + row['Num_P'] + '?template=personne/details/modal/adresse"><i class="fa-regular fa-address-book fa-lg px-1" title="Coordonnées"></i></a>';
return itineraire_modaleJS + adresse ;
}
},
{ data: 'telephones',
render: function ( data, type, row ) {
// test du tableau [telephones] et éviter d'afficher des « undefined » s'il est vide
var telephone = '';
var portable = '';
if ( data.length > 0 && row['tels']['telephone'] !== '' ) {
telephone = 'T : <a href="tel:' + row['tels']['telephone'] + '">' + row['tels']['telephone'] + '</a><br>';
}
if ( data.length > 0 && row['tels']['portable'] !== '' ) {
portable = 'P : <a href="tel:' + row['tels']['portable'] + '">' + row['tels']['portable'] + '</a><br>';
}
return telephone + portable ;
}
},
{ data: 'telephones',
render: function ( data, type, row ) {
var email = '';
var skype = '';
var siteweb = '';
if ( data.length > 0 && row['tels']['email'] !== '' ) {
email = '<a title="Envoyer un mail" href="mailto:' + row['tels']['email'] + '"><i class="fa-solid fa-at fa-lg has-text-weight-light grey mr-2"></i></a>';
}
if ( data.length > 0 && row['tels']['loginskype'] !== '' ) {
skype = '<a href="skype:' + row['tels']['loginskype'] + '?chat"><i class="fa-brands fa-skype fa-xl deepskyblue mr-2"></i></a>';
}
if ( data.length > 0 && row['tels']['siteweb'] !== '' ) {
siteweb = '<a target="_blank" href="'+ row['tels']['siteweb'] + '"><i class="fa-regular fa-compass fa-lg has-text-weight-light grey mr-2" title="' + row['tels']['siteweb'] + '"></i></a>';
}
return email + siteweb + skype ;
}
},
{ data: 'chefProduit', render: render_rub_multival },
{ data: 'secteurActivite', render: render_rub_multival_virgule },
{ data: 'pays.uppercase',
render: function ( data, type, row ) {
var departement = '';
if (data == 'FRANCE') {
departement = row['CP_Avant'].substring(0, 2);
}
return departement;
}
}
];
// TABLE
var table = new DataTable('#liste_personnes', {
data: dataSet,
columns: contenuColonnes,
/* layout: {
top1: 'searchPanes',
},
*/
caption: '',
searchPanes: {
columns: [7, 6, 15, 9],
cascadePanes: true,
viewTotal: true
},
responsive: {
details: false
},
columnDefs: [
{ visible: false, targets: [2, 3, 6, 7, 15] },
{ orderable: false, targets: '_all' },
{ responsivePriority: 1, targets: [0, 1, 4] },
{ className: 'icone', targets: [0, 1, 10, 12] }
],
/* orderFixed: [[3, 'asc'], [ 8, 'asc' ]],
order: [ 4, 'asc' ],
*/
orderFixed: [[3, 'asc']],
order: [[8, 'asc'], [ 2, 'desc' ], [ 4, 'asc' ]],
rowGroup: {
dataSrc: 'Societe',
startClassName: 'rupture_white',
endClassName: 'rupture_spacer_white',
startRender: function ( rows, group, level ) {
var tagSociete = '<span class="tag is-dark">' + group + '</span>' ;
var tagGroupe = '';
var groupeClient = rows.data()[0].groupe.libelle ;
if (groupeClient !== '') {
var tagGroupe = '<span class="tag bg-sticker-vert has-text-white">Groupe ' + groupeClient + '</span>';
}
var tagSecteurs = '';
var secteurs = render_rub_multival_virgule(rows.data()[0]['secteurActivite'], 'display');
if (secteurs !== '') {
var tagSecteurs = '<div class="tags are-medium my-1 is-pulled-right"><span class="tag is-light border-silver">' + secteurs + '</span></div>' ;
}
return '<div class="tags are-medium has-addons my-1 is-pulled-left">' + tagSociete + tagGroupe +'</div>' + tagSecteurs ;
},
endRender: function ( rows, group ) {
// pour créer de l'espace après chaque groupe
return '<br>';
},
},
createdRow: function( row, data, dataIndex ) {
// highlight des lignes des sociétés (personnes morales)
if (data.Pers_Physique == false) {
$(row).addClass('has-background-light-$4DTEXT(WEB_vt_interface)');
$(row).addClass('highlight-societe');
}
if (data.aSupprimer.libelle == 'oui') {
$(row).addClass('has-background-warning-light');
}
}
});
You can jump to the latest bin by adding /latest
to your URL
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + [ | Indents selected lines |
ctrl + ] | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Clone Bin |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |