e_collectivites-version
parent
cc7a023815
commit
6d6dc9ce8e
@ -1,14 +0,0 @@ |
||||
API Pléiade pour SSO avec LemonLDAP |
||||
|
||||
// TODO : doc ! + passer le README en .md |
||||
|
||||
// TODO : indiquer qu'il faut le mod php-curl (phpenmod curl) |
||||
|
||||
exemple d'une requête curl Lemon / Myapplications : |
||||
|
||||
curl 'https://authdev.ecollectivites.fr/myapplications' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Cookie: llnglanguage=fr; lemonldap=076e890b80eb23483d352541795b70751f86c57cba94c2a0a20466d55ec4ae53' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: none' -H 'Sec-Fetch-User: ?1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' |
||||
|
||||
|
||||
## Admin |
||||
|
||||
/admin/config/api_lemon_pleiade/settings |
@ -1,23 +1,16 @@ |
||||
api_lemon_pleiade_js: |
||||
js: |
||||
# js/api_pastell_test.js: {} |
||||
js/api_lemon_pleiade_menu.js: {} |
||||
js/api_lemon_pleiade_home_blocks_sortable.js: {} |
||||
js/api_lemon_pleiade_sidebar_menu.js: {} |
||||
js/api_lemon_pleiade_desktop_blocks.js: {} |
||||
js/api_lemon_pleiade_history.js: {} |
||||
# js/Sortable.min.js: {} |
||||
dependencies: |
||||
- core/drupal |
||||
- core/jquery |
||||
- core/drupalSettings |
||||
- core/once |
||||
- core/drupal.ajax |
||||
- core/views.ajax |
||||
- core/jquery.ui |
||||
api_lemon_pleiade_css: |
||||
version: 1.x |
||||
css: |
||||
theme: |
||||
css/api_lemon_pleiade.css: {} |
||||
sortable_pleiade_js: |
||||
js: |
||||
js/Sortable.min.js: {} |
||||
js: |
||||
js/libs/sortable.min.js: { preprocess: false } |
@ -1,159 +0,0 @@ |
||||
(function ($, Drupal, drupalSettings) { |
||||
Drupal.behaviors.APIlemonDataPleiadeBehavior = { |
||||
attach: function (context, settings) { |
||||
// var field_lemon_url = drupalSettings.api_lemon_pleiade.field_lemon_url;
|
||||
// var field_lemon_myapplications_url = drupalSettings.api_lemon_pleiade.field_lemon_myapplications_url;
|
||||
// var field_pastell_url = drupalSettings.api_lemon_pleiade.field_pastell_url;
|
||||
// var field_parapheur_url = drupalSettings.api_lemon_pleiade.field_parapheur_url;
|
||||
// var field_ged_url = drupalSettings.api_lemon_pleiade.field_ged_url;
|
||||
|
||||
$(document).ready(function () { |
||||
// TEST JS custom module init +
|
||||
|
||||
// $( "#blocLemonCustom" ).sortable();
|
||||
|
||||
console.log("Module Pléiade API/Lemon --> hello :))"); |
||||
|
||||
$.ajax({ |
||||
url: Drupal.url("api_lemon_pleiade/pleiade-data-autocomplete"), // on appelle le script JSON
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "POST", |
||||
data: { |
||||
//variable envoyé avec la requête vers le serveur
|
||||
myapplications: "", // pour le moment on recupere tout ce que renvoie myapplications de lemon
|
||||
}, |
||||
success: function (donnees) { |
||||
//donnees est le reçu du serveur avec les résultats
|
||||
// console.log(donnees);
|
||||
|
||||
// on l'affiche dans une tab des settings du theme pour voir (et pour le fun :))
|
||||
const obj = JSON.stringify(donnees); |
||||
document.getElementById("lemonApps").innerHTML = |
||||
"<pre>" + obj + "</pre>"; |
||||
|
||||
// div #menuTestLemon
|
||||
var menuHtml = "<ul>"; |
||||
|
||||
for (var i = 0; i < donnees.myapplications.length; i++) { // on récupère la longueur du json pour boucler sur le nombre afin de créer tout nos lien du menu
|
||||
menuHtml += |
||||
'<li class="nav-small-cap"><i class="mdi mdi-dots-horizontal"></i><span class="hide-menu">' + |
||||
donnees.myapplications[i].Category + // on récupère toute les catégories du json qu'on stocke dans une liste
|
||||
"</span></li>"; |
||||
for ( var f = 0; f < donnees.myapplications[i].Applications.length; f++) { // Pour chaque catégories, on récupère le nombre d'applications de la catégorie puis on boucle dessus
|
||||
const temp = Object.values(donnees.myapplications[i].Applications[f]); |
||||
|
||||
menuHtml += // on créé ensuite le lien avec le title du lien et le la description, pour créer le bloc
|
||||
'<a class="sidebar-link waves-effect waves-dark" title="' + |
||||
temp[0].AppDesc + |
||||
'" href="' + |
||||
temp[0].AppUri + |
||||
'" aria-expanded="false"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-corner-down-right"><polyline points="15 10 20 15 15 20"/><path d="M4 4v7a4 4 0 0 0 4 4h12"/></svg><span class="hide-menu">' + |
||||
Object.keys(donnees.myapplications[i].Applications[f]) + |
||||
" </span></a>"; |
||||
} |
||||
menuHtml += '<li class="nav-devider"></li>'; |
||||
} |
||||
menuHtml += "</ul>"; |
||||
|
||||
document.getElementById("menuTestLemon2").innerHTML = menuHtml; // on récupère l'entièreté du menu créé puis on le stocke dans la div contenant l'id menuTestLemon2
|
||||
|
||||
// Ajout du bloc a la page accueil
|
||||
|
||||
var blocLemon = ""; |
||||
|
||||
for (var i = 0; i < donnees.myapplications.length; i++) { |
||||
|
||||
// nommage id div pour boucle du bloc i pour drag and drop
|
||||
var id = 'row-'+i; |
||||
|
||||
blocLemon += |
||||
`<div class="col-lg-12"><div class="mb-2 shadow-lg"><div class="card my-2"><div class="card-header rounded-top" style="background-color: #1f3889"><h4 class="card-title text-light">` + |
||||
donnees.myapplications[i].Category + |
||||
`<span></span></h4></div><div class="card-body"><div class="row px-4" id="${id}">`; // ajout de le l'id dans le html avec le numéro de boucle
|
||||
for ( var f = 0; f < donnees.myapplications[i].Applications.length; f++) { |
||||
const temp = Object.values( |
||||
donnees.myapplications[i].Applications[f] |
||||
); |
||||
|
||||
blocLemon += |
||||
'<div class="col-md-4 my-3"><a class="border-dark text-center row py-3 h-100 shadow-lg" title="' + |
||||
temp[0].AppDesc + |
||||
'" href="' + |
||||
temp[0].AppUri + |
||||
'"><div class="col-4 align-items-center justify-content-center d-flex"><svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg></div><div class="col-8 "><h5 class="card-title">' + |
||||
Object.keys(donnees.myapplications[i].Applications[f]) + |
||||
'</h5><p class="text-muted">' + |
||||
temp[0].AppDesc + |
||||
'</p></div></a></div>'; |
||||
} |
||||
blocLemon += "</div></div></div></div></div></div>"; |
||||
|
||||
} |
||||
|
||||
|
||||
document.getElementById("blocLemonCustom").innerHTML = blocLemon; // ajout du html dans la div avec l'id blocLemonCustom
|
||||
|
||||
// récupère le nombre de div enfante de l'element blocLemonCustom
|
||||
const htmlDoc = document.getElementById("blocLemonCustom"); |
||||
const box = htmlDoc.children.length; |
||||
for ( var f = 0; f < box; f++){ |
||||
// récup des éléments du bloc dont l'id contient row-n
|
||||
var temps = document.getElementById("row-"+f); |
||||
Sortable.create(temps, { |
||||
animation: 150, |
||||
store: { // ajout de la sauvegarde des emplacements de chaque blocs au rafraichissement
|
||||
/** |
||||
* Get the order of elements. Called once during initialization.
|
||||
* @param {Sortable} sortable |
||||
* @returns {Array} |
||||
*/ |
||||
get: function (sortable) { |
||||
var order = localStorage.getItem(sortable.options.group); |
||||
return order ? order.split("|") : []; |
||||
}, |
||||
|
||||
/** |
||||
* Save the order of elements. Called onEnd (when the item is dropped). |
||||
* @param {Sortable} sortable |
||||
*/ |
||||
set: function (sortable) { |
||||
var order = sortable.toArray(); |
||||
localStorage.setItem(sortable.options.group, order.join("|"));
|
||||
}, |
||||
}, |
||||
|
||||
}); |
||||
} |
||||
|
||||
var el = document.getElementById("blocLemonCustom"); |
||||
|
||||
new Sortable.create(el, { |
||||
animation: 150, |
||||
store: { // ajout de la sauvegarde des emplacement de chaque blocs au rafraichissement
|
||||
/** |
||||
* Get the order of elements. Called once during initialization. |
||||
* @param {Sortable} sortable |
||||
* @returns {Array} |
||||
*/ |
||||
get: function (sortable) { |
||||
var order = localStorage.getItem(sortable.options.group); |
||||
return order ? order.split("|") : []; |
||||
}, |
||||
|
||||
/** |
||||
* Save the order of elements. Called onEnd (when the item is dropped). |
||||
* @param {Sortable} sortable |
||||
*/ |
||||
set: function (sortable) { |
||||
var order = sortable.toArray(); |
||||
localStorage.setItem(sortable.options.group, order.join("|")); |
||||
}, |
||||
}, |
||||
}); |
||||
}, |
||||
}); |
||||
}); |
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, drupalSettings); |
||||
|
@ -1,262 +0,0 @@ |
||||
(function ($, Drupal, once) { |
||||
"use strict"; |
||||
|
||||
Drupal.behaviors.APIlemonDataBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
once("APIlemonDataBehavior", "body", context).forEach(function () { |
||||
|
||||
//------------------------------------------------------
|
||||
//Requete pour récupérer les collectivités du user actif
|
||||
//------------------------------------------------------
|
||||
|
||||
$.ajax({ |
||||
url: Drupal.url("modules/custom/api_lemon_pleiade/js/tempo.json"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "GET", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
// console.log(donnees)
|
||||
var linkEntitie = ""; |
||||
|
||||
for (var i = 0; i < donnees.length; i++) { |
||||
linkEntitie += |
||||
'<option class="dropdown-item" value="' + |
||||
donnees[i].id_e + |
||||
'">' + |
||||
donnees[i].denomination + |
||||
"</option>"; |
||||
} |
||||
document.getElementById("collectiviteChoice").innerHTML += |
||||
linkEntitie; |
||||
}, |
||||
}); |
||||
|
||||
//------------------------------------------------------
|
||||
//Changement de la collectivité au clic
|
||||
//------------------------------------------------------
|
||||
|
||||
if(!localStorage.getItem('collectivite_id')){ |
||||
var id_collectivite = $(this).children("option:selected").val(); |
||||
} |
||||
else{ |
||||
id_collectivite = localStorage.getItem('collectivite_id'); |
||||
|
||||
document.getElementById('collectiviteChoice').options[localStorage.getItem('collectivite_id')].selected = true; |
||||
} |
||||
$("select.collectivitechoiceli").change(function(){ |
||||
if(localStorage.getItem('collectivite_id') != $(this).children("option:selected").val()){ |
||||
localStorage.setItem('collectivite_id', $(this).children("option:selected").val()); |
||||
} |
||||
$.ajax({ |
||||
url: Drupal.url( |
||||
"modules/custom/api_lemon_pleiade/js/document_tempo.json" |
||||
), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "GET", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
// console.log(donnees)
|
||||
$( "#pastell_block" ).remove(); |
||||
//--------------------------------------//
|
||||
|
||||
var document_coll = |
||||
'\ |
||||
<div class="col-lg-12" id="pastell_block"> \ |
||||
<div class="mb-2 shadow-lg">\ |
||||
<div class="card my-2">\ |
||||
<div class="card-header rounded-top" style="background-color: #1f3889">\ |
||||
<h4 class="card-title text-light">\ |
||||
Télétransmission : Derniers documents : Collectivité n°'+ localStorage.getItem('collectivite_id') +'<span></span>\ |
||||
</h4>\ |
||||
</div>\ |
||||
<div class="card-body">\ |
||||
<table class="table">\ |
||||
<thead>\ |
||||
<tr>\ |
||||
<th scope="col">Titre</th>\ |
||||
<th scope="col">Type</th>\ |
||||
<th scope="col">Dernière modification</th>\ |
||||
<th scope="col">Statut</th>\ |
||||
<th></th>\ |
||||
<th></th>\ |
||||
<th></th>\ |
||||
</tr>\ |
||||
</thead>\ |
||||
<tbody>'; |
||||
|
||||
for (var i = 0; i < donnees.length; i++) { |
||||
//TODO voir pour les différents états des documents
|
||||
// switch (donnees[i].last_action_display) {
|
||||
// case "":
|
||||
// // code block
|
||||
// break;
|
||||
// default:
|
||||
// // code block
|
||||
// }
|
||||
var objectDate = new Date(donnees[i].last_action_date); |
||||
|
||||
|
||||
var badge_color = "bg-success"; |
||||
var last_action = "En Cours de Création"; |
||||
var lien_pastell_detail = "https://pastelldev.ecollectivites.fr/Document/detail?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e; |
||||
var lien_pastell_edition = "https://pastelldev.ecollectivites.fr/Document/edition?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e; |
||||
var lien_pastell_supp = "https://pastelldev.ecollectivites.fr/Document/warning?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e + "&action=supression"; |
||||
document_coll += "\ |
||||
<tr>\ |
||||
<td>" + donnees[i].titre +"</td>\ |
||||
<td>" + donnees[i].type +"</td>\ |
||||
<td>" + String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + '</td>\ |
||||
<td><span class="badge ' +badge_color +'">'+ last_action +'</span></td>\ |
||||
<td><a href="' + lien_pastell_detail +'"><i data-feather="search" class="feather-icon"></i></a></td>\ |
||||
<td><a href="' + lien_pastell_edition +'"><i data-feather="edit" class="feather-icon"></i></a></td>\ |
||||
<td><a href="' + lien_pastell_supp +'"><i data-feather="trash-2" class="feather-icon"></i></a></td>\ |
||||
</tr>\ |
||||
'; |
||||
} |
||||
document_coll += "\ |
||||
</tbody>\ |
||||
</table>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
" |
||||
document.getElementById("blocLemonCustom").innerHTML += document_coll; |
||||
feather.replace(); |
||||
}, |
||||
}); |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}); |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// $("ul.collectivitechoiceli", context).on("click", function (event) {
|
||||
|
||||
// var id_collectivite = event.target.id;
|
||||
// var nb_id_coll = id_collectivite.replace(/[^\d]/g, "").replace(/[_\s]/g, "");
|
||||
|
||||
// $.ajax({
|
||||
// url: Drupal.url(
|
||||
// "modules/custom/api_lemon_pleiade/js/document_tempo.json"
|
||||
// ), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
// dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
// type: "GET",
|
||||
// data: {},
|
||||
// success: function (donnees) {
|
||||
// // console.log(donnees)
|
||||
// $( "#pastell_block" ).remove();
|
||||
// //--------------------------------------//
|
||||
// //Temporaire
|
||||
// if ((nb_id_coll == 24)) {
|
||||
// //--------------------------------------//
|
||||
// localStorage.setItem('collectivite_id', nb_id_coll);
|
||||
// var document_coll =
|
||||
// '\
|
||||
// <div class="col-lg-12" id="pastell_block"> \
|
||||
// <div class="mb-2 shadow-lg">\
|
||||
// <div class="card my-2">\
|
||||
// <div class="card-header rounded-top" style="background-color: #1f3889">\
|
||||
// <h4 class="card-title text-light">\
|
||||
// Télétransmission : Derniers documents <span></span>\
|
||||
// </h4>\
|
||||
// </div>\
|
||||
// <div class="card-body">\
|
||||
// <table class="table">\
|
||||
// <thead>\
|
||||
// <tr>\
|
||||
// <th scope="col">Titre</th>\
|
||||
// <th scope="col">Type</th>\
|
||||
// <th scope="col">Dernière modification</th>\
|
||||
// <th scope="col">Statut</th>\
|
||||
// <th></th>\
|
||||
// <th></th>\
|
||||
// <th></th>\
|
||||
// </tr>\
|
||||
// </thead>\
|
||||
// <tbody>';
|
||||
|
||||
// for (var i = 0; i < donnees.length; i++) {
|
||||
// //TODO voir pour les différents états des documents
|
||||
// // switch (donnees[i].last_action_display) {
|
||||
// // case "":
|
||||
// // // code block
|
||||
// // break;
|
||||
// // default:
|
||||
// // // code block
|
||||
// // }
|
||||
// var objectDate = new Date(donnees[i].last_action_date);
|
||||
|
||||
// console.log(objectDate);
|
||||
// var badge_color = "bg-success";
|
||||
// var last_action = "En Cours de Création";
|
||||
// var lien_pastell_detail = "https://pastelldev.ecollectivites.fr/Document/detail?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e;
|
||||
// var lien_pastell_edition = "https://pastelldev.ecollectivites.fr/Document/edition?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e;
|
||||
// var lien_pastell_supp = "https://pastelldev.ecollectivites.fr/Document/warning?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e + "&action=supression";
|
||||
// document_coll += "\
|
||||
// <tr>\
|
||||
// <td>" + donnees[i].titre +"</td>\
|
||||
// <td>" + donnees[i].type +"</td>\
|
||||
// <td>" + String(objectDate.getDate()).padStart(2, "0") +
|
||||
// "/" +
|
||||
// String(objectDate.getMonth() + 1).padStart(2, "0") +
|
||||
// "/" +
|
||||
// objectDate.getFullYear() +
|
||||
// " " +
|
||||
// String(objectDate.getHours()).padStart(2, "0") +
|
||||
// ":" +
|
||||
// String(objectDate.getMinutes()).padStart(2, "0") + '</td>\
|
||||
// <td><span class="badge ' +badge_color +'">'+ last_action +'</span></td>\
|
||||
// <td><a href="' + lien_pastell_detail +'"><i data-feather="search" class="feather-icon"></i></a></td>\
|
||||
// <td><a href="' + lien_pastell_edition +'"><i data-feather="edit" class="feather-icon"></i></a></td>\
|
||||
// <td><a href="' + lien_pastell_supp +'"><i data-feather="trash-2" class="feather-icon"></i></a></td>\
|
||||
// </tr>\
|
||||
// ';
|
||||
// }
|
||||
// document_coll += "\
|
||||
// </tbody>\
|
||||
// </table>\
|
||||
// </div>\
|
||||
// </div>\
|
||||
// </div>\
|
||||
// </div>\
|
||||
// "
|
||||
// document.getElementById("blocLemonCustom").innerHTML += document_coll;
|
||||
// feather.replace();
|
||||
|
||||
|
||||
// }
|
||||
|
||||
// else {
|
||||
// $( "#pastell_block" ).remove();
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// });
|
||||
|
||||
}); // fin once
|
||||
} // fin exlude admin pages
|
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, once); |
@ -0,0 +1,149 @@ |
||||
(function (Drupal, drupalSettings, once) { |
||||
"use strict"; |
||||
Drupal.behaviors.APIlemonHomeBlocksBehavior = { |
||||
attach: function (context, settings) { |
||||
// only on frontpage (desktop)
|
||||
if (drupalSettings.path.currentPath.includes("node")) { |
||||
// use Drupal.once() instead of Jquery.once()
|
||||
once("APIlemonHomeBlocksBehavior", "body", context).forEach( |
||||
function () { |
||||
// TODO : blocks DOES NOT EXIST ??!! fix in theme ?
|
||||
var spinner = document.querySelector("#spinner-div-lemon_apps"); |
||||
// show spinner while ajax is loading
|
||||
if (spinner) { |
||||
spinner.style.display = "block"; |
||||
} |
||||
// make ajax call
|
||||
var xhr = new XMLHttpRequest(); |
||||
xhr.open("POST", Drupal.url("v1/api_lemon_pleiade/lemon-myapps-query")); |
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); |
||||
xhr.responseType = "json"; |
||||
xhr.onload = function () { |
||||
if (xhr.status === 200) { |
||||
var donnees = xhr.response; |
||||
var blocLemon = ""; |
||||
|
||||
for (var i = 0; i < donnees.myapplications.length; i++) { |
||||
// nommage id div pour boucle du bloc i pour drag and drop
|
||||
var id = "row-" + i; |
||||
|
||||
blocLemon += |
||||
`<div class="col-lg-12"><div class="mb-2 shadow-lg"><div class="card my-2"><div class="card-header rounded-top" style="background-color: #1f3889"><h4 class="card-title text-light">` + |
||||
donnees.myapplications[i].Category + |
||||
`<span></span></h4></div><div class="card-body"><div class="row" id="${id}">`; // ajout de le l'id dans le html avec le numéro de boucle
|
||||
for ( |
||||
var f = 0; |
||||
f < donnees.myapplications[i].Applications.length; |
||||
f++ |
||||
) { |
||||
const temp = Object.values( |
||||
donnees.myapplications[i].Applications[f] |
||||
); |
||||
|
||||
blocLemon += |
||||
'<div class="col-md-4 my-3"><a target="_blank" class="border-dark text-center" title="' + |
||||
temp[0].AppDesc + |
||||
'" href="' + |
||||
temp[0].AppUri + |
||||
'"><div class="col-12 py-3 h-100 shadow-lg"><h5 class="card-title">' + |
||||
Object.keys(donnees.myapplications[i].Applications[f]) + |
||||
'</h5><p class="text-muted">' + |
||||
temp[0].AppDesc + |
||||
"</p></div></a></div>"; |
||||
} |
||||
blocLemon += "</div></div></div></div></div></div>"; |
||||
} |
||||
// ajout du html dans la div avec l'id blocLemonCustom
|
||||
document.getElementById("blocLemonCustom").innerHTML += blocLemon; |
||||
} |
||||
}; |
||||
xhr.onerror = function () { |
||||
console.log("Error making AJAX call"); |
||||
}; |
||||
xhr.onabort = function () { |
||||
console.log("AJAX call aborted"); |
||||
}; |
||||
xhr.ontimeout = function () { |
||||
console.log("AJAX call timed out"); |
||||
}; |
||||
xhr.onloadend = function () { |
||||
// hide spinner when ajax is complete
|
||||
// if(spinner) {
|
||||
// spinner.style.display = "none";
|
||||
// }
|
||||
|
||||
// Sortable here ?
|
||||
const htmlDoc = document.getElementById("blocLemonCustom"); |
||||
const nbObjinBlocLemon = htmlDoc.children.length; |
||||
for (var f = 0; f < nbObjinBlocLemon; f++) { |
||||
// récup des éléments du bloc dont l'id contient row-n
|
||||
var nbBloc = document.getElementById("row-" + f); |
||||
Sortable.create(nbBloc, { |
||||
animation: 150, |
||||
store: { |
||||
// ajout de la sauvegarde des emplacements de chaque blocs au rafraichissement
|
||||
/** |
||||
* Get the order of elements. Called once during initialization. |
||||
* @param {Sortable} sortable |
||||
* @returns {Array} |
||||
*/ |
||||
get: function (sortable) { |
||||
var order = localStorage.getItem( |
||||
sortable.options.group |
||||
); |
||||
return order ? order.split("|") : []; |
||||
}, |
||||
|
||||
/** |
||||
* Save the order of elements. Called onEnd (when the item is dropped). |
||||
* @param {Sortable} sortable |
||||
*/ |
||||
set: function (sortable) { |
||||
var order = sortable.toArray(); |
||||
localStorage.setItem( |
||||
sortable.options.group, |
||||
order.join("|") |
||||
); |
||||
}, |
||||
}, |
||||
}); |
||||
var recupBlocForDragAndDrop = document.getElementById("blocLemonCustom"); |
||||
|
||||
new Sortable.create(recupBlocForDragAndDrop, { |
||||
animation: 150, |
||||
store: { |
||||
// ajout de la sauvegarde des emplacement de chaque blocs au rafraichissement
|
||||
/** |
||||
* Get the order of elements. Called once during initialization. |
||||
* @param {Sortable} sortable |
||||
* @returns {Array} |
||||
*/ |
||||
get: function (sortable) { |
||||
var order = localStorage.getItem( |
||||
sortable.options.group |
||||
); |
||||
return order ? order.split("|") : []; |
||||
}, |
||||
|
||||
/** |
||||
* Save the order of elements. Called onEnd (when the item is dropped). |
||||
* @param {Sortable} sortable |
||||
*/ |
||||
set: function (sortable) { |
||||
var order = sortable.toArray(); |
||||
localStorage.setItem( |
||||
sortable.options.group, |
||||
order.join("|") |
||||
); |
||||
}, |
||||
}, |
||||
}); |
||||
} |
||||
|
||||
}; |
||||
xhr.send(); |
||||
}); // end once
|
||||
} // fin only on frontpage
|
||||
}, |
||||
}; |
||||
})(Drupal, drupalSettings, once); |
@ -1,108 +1,94 @@ |
||||
(function ($, Drupal, once) { |
||||
"use strict"; |
||||
Drupal.behaviors.APIlemonDataHistoryeBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
once("APIlemonDataHistoryeBehavior", "body", context).forEach( |
||||
function () { |
||||
$.ajax({ |
||||
url: Drupal.url("v1/api_lemon_pleiade/lemon-session-query"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "POST", |
||||
data: {}, |
||||
|
||||
success: function (history) { |
||||
//historique en json
|
||||
//console.log(history);
|
||||
|
||||
localStorage.setItem("groups", history.groups); |
||||
} |
||||
});
|
||||
|
||||
|
||||
// Si on est sur la page historique des connexions
|
||||
if (drupalSettings.path.currentPath === "history") { |
||||
console.log("We are on page : history!!"); |
||||
|
||||
$.ajax({ |
||||
url: Drupal.url("v1/api_lemon_pleiade/lemon-session-query"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "POST", |
||||
data: {}, |
||||
|
||||
success: function (history) { |
||||
//historique en json
|
||||
//console.log(history);
|
||||
|
||||
localStorage.setItem("groups", history.groups); |
||||
|
||||
var history_table = |
||||
'<h4 class="card-header rounded-top card-title text-light" style="background-color: #1f3889">Dernières connexions</h4><table class="table"><thead><tr><th scope="col">Date</th><th scope="col">Adresse IP</th></tr></thead><tbody>'; |
||||
for ( |
||||
var i = 0; |
||||
i < history._loginHistory.successLogin.length; |
||||
i++ |
||||
) { |
||||
var objectDate = new Date( |
||||
history._loginHistory.successLogin[i]._utime * 1000 |
||||
); |
||||
|
||||
history_table += |
||||
"<tr><td>" + |
||||
String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + |
||||
"</td><td>" + |
||||
history._loginHistory.successLogin[i].ipAddr + |
||||
"</td></tr>"; |
||||
} |
||||
(function (Drupal, drupalSettings) { |
||||
"use strict"; |
||||
Drupal.behaviors.APIlemonDataHistoryeBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
if (drupalSettings.path.currentPath.includes("history")) { |
||||
// once("APIlemonDataHistoryeBehavior", function () {
|
||||
var request = new XMLHttpRequest(); |
||||
request.open( |
||||
"POST", |
||||
Drupal.url("v1/api_lemon_pleiade/lemon-session-query"), |
||||
true |
||||
); |
||||
request.setRequestHeader("Content-Type", "application/json; charset=UTF-8"); |
||||
request.onload = function () { |
||||
if (this.status >= 200 && this.status < 400) { |
||||
var response = JSON.parse(this.response); |
||||
localStorage.setItem("groups", response.groups); |
||||
|
||||
// Si on est sur la page historique des connexions
|
||||
if (drupalSettings.path.currentPath === "history") { |
||||
console.log("We are on page : history!!"); |
||||
|
||||
var history_table = |
||||
'<h4 class="card-header rounded-top card-title text-light" style="background-color: #1f3889">Dernières connexions</h4><table class="table"><thead><tr><th scope="col">Date</th><th scope="col">Adresse IP</th></tr></thead><tbody>'; |
||||
if(response._loginHistory.successLogin) { |
||||
for ( |
||||
var i = 0; |
||||
i < response._loginHistory.successLogin.length; |
||||
i++ |
||||
) { |
||||
var objectDate = new Date( |
||||
response._loginHistory.successLogin[i]._utime * 1000 |
||||
); |
||||
history_table += |
||||
'</tbody></table><h4 class="card-header rounded-top card-title text-light" style="background-color: #1f3889">Dernières connexions echouées</h4><table class="table mb-5"><thead><tr><th scope="col">Date</th><th scope="col">Adresse IP</th></tr></thead><tbody>'; |
||||
for ( |
||||
var i = 0; |
||||
i < history._loginHistory.failedLogin.length; |
||||
i++ |
||||
) { |
||||
var objectDate = new Date( |
||||
history._loginHistory.failedLogin[i]._utime * 1000 |
||||
); |
||||
|
||||
history_table += |
||||
"<tr><td>" + |
||||
String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + |
||||
"</td><td>" + |
||||
history._loginHistory.successLogin[i].ipAddr + |
||||
"</td></tr>"; |
||||
} |
||||
"<tr><td>" + |
||||
String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + |
||||
"</td><td>" + |
||||
response._loginHistory.successLogin[i].ipAddr + |
||||
"</td></tr>"; |
||||
} |
||||
} |
||||
history_table += |
||||
'</tbody></table><h4 class="card-header rounded-top card-title text-light" style="background-color: #1f3889">Dernières connexions echouées</h4><table class="table mb-5"><thead><tr><th scope="col">Date</th><th scope="col">Adresse IP</th></tr></thead><tbody>'; |
||||
if(response._loginHistory.failedLogin) { |
||||
for ( |
||||
var i = 0; |
||||
i < response._loginHistory.failedLogin.length; |
||||
i++ |
||||
) { |
||||
var objectDate = new Date( |
||||
response._loginHistory.failedLogin[i]._utime * 1000 |
||||
); |
||||
|
||||
history_table += |
||||
"<tr><td>" + |
||||
String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + |
||||
"</td><td>" + |
||||
response._loginHistory.failedLogin[i].ipAddr + |
||||
"</td></tr>"; |
||||
} |
||||
} |
||||
|
||||
document.getElementById("history-connexion").innerHTML = |
||||
history_table; |
||||
|
||||
document.getElementById("history-connexion").innerHTML = |
||||
history_table; |
||||
|
||||
}, |
||||
complete: function () { |
||||
$("#spinner-div").hide(); //Request is complete so hide spinner
|
||||
$("#spinner-history").hide(); //Request is complete so hide spinner
|
||||
}, |
||||
}); |
||||
} |
||||
} |
||||
); // fin once
|
||||
} // fin exlude admin pages
|
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, once); |
||||
// hide throbber
|
||||
document.getElementById('spinner-history').style.display = 'none'; |
||||
} |
||||
} |
||||
}; |
||||
request.send(); |
||||
// });
|
||||
} |
||||
}, |
||||
}; |
||||
})(Drupal, drupalSettings); |
||||
|
@ -1,133 +0,0 @@ |
||||
(function ($, Drupal, once) { |
||||
"use strict"; |
||||
Drupal.behaviors.APIlemonHomeBlocksBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
once("APIlemonHomeBlocksBehavior", "body", context).forEach( |
||||
function () { |
||||
$.ajax({ |
||||
url: Drupal.url("v1/api_lemon_pleiade/lemon-myapps-query"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "POST", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
var blocLemon = ""; |
||||
|
||||
for (var i = 0; i < donnees.myapplications.length; i++) { |
||||
// nommage id div pour boucle du bloc i pour drag and drop
|
||||
var id = "row-" + i; |
||||
|
||||
blocLemon += |
||||
`<div class="col-lg-12"><div class="mb-2 shadow-lg"><div class="card my-2"><div class="card-header rounded-top" style="background-color: #1f3889"><h4 class="card-title text-light">` + |
||||
donnees.myapplications[i].Category + |
||||
`<span></span></h4></div><div class="card-body"><div class="row" id="${id}">`; // ajout de le l'id dans le html avec le numéro de boucle
|
||||
for ( |
||||
var f = 0; |
||||
f < donnees.myapplications[i].Applications.length; |
||||
f++ |
||||
) { |
||||
const temp = Object.values( |
||||
donnees.myapplications[i].Applications[f] |
||||
); |
||||
|
||||
blocLemon += |
||||
'<div class="col-md-4 my-3"><a target="_blank" class="border-dark text-center" title="' + |
||||
temp[0].AppDesc + |
||||
'" href="' + |
||||
temp[0].AppUri + |
||||
'"><div class="col-12 py-3 h-100 shadow-lg"><h5 class="card-title">' + |
||||
Object.keys(donnees.myapplications[i].Applications[f]) + |
||||
'</h5><p class="text-muted">' + |
||||
temp[0].AppDesc + |
||||
"</p></div></a></div>"; |
||||
} |
||||
blocLemon += "</div></div></div></div></div></div>"; |
||||
} |
||||
|
||||
|
||||
// récupère le nombre de div enfante de l'element blocLemonCustom
|
||||
// Le bureau = frontpage = 'node' url; on gère les blocs/portlets Pléiade que sur la frontpage
|
||||
if (drupalSettings.path.currentPath === "node") { |
||||
document.getElementById("blocLemonCustom").innerHTML += blocLemon; // ajout du html dans la div avec l'id blocLemonCustom
|
||||
const htmlDoc = document.getElementById("blocLemonCustom"); |
||||
const nbObjinBlocLemon = htmlDoc.children.length; |
||||
for (var f = 0; f < nbObjinBlocLemon; f++) { |
||||
// récup des éléments du bloc dont l'id contient row-n
|
||||
var nbBloc = document.getElementById("row-" + f); |
||||
Sortable.create(nbBloc, { |
||||
animation: 150, |
||||
store: { |
||||
// ajout de la sauvegarde des emplacements de chaque blocs au rafraichissement
|
||||
/** |
||||
* Get the order of elements. Called once during initialization. |
||||
* @param {Sortable} sortable |
||||
* @returns {Array} |
||||
*/ |
||||
get: function (sortable) { |
||||
var order = localStorage.getItem( |
||||
sortable.options.group |
||||
); |
||||
return order ? order.split("|") : []; |
||||
}, |
||||
|
||||
/** |
||||
* Save the order of elements. Called onEnd (when the item is dropped). |
||||
* @param {Sortable} sortable |
||||
*/ |
||||
set: function (sortable) { |
||||
var order = sortable.toArray(); |
||||
localStorage.setItem( |
||||
sortable.options.group, |
||||
order.join("|") |
||||
); |
||||
}, |
||||
}, |
||||
}); |
||||
var recupBlocForDragAndDrop = document.getElementById("blocLemonCustom"); |
||||
|
||||
new Sortable.create(recupBlocForDragAndDrop, { |
||||
animation: 150, |
||||
store: { |
||||
// ajout de la sauvegarde des emplacement de chaque blocs au rafraichissement
|
||||
/** |
||||
* Get the order of elements. Called once during initialization. |
||||
* @param {Sortable} sortable |
||||
* @returns {Array} |
||||
*/ |
||||
get: function (sortable) { |
||||
var order = localStorage.getItem( |
||||
sortable.options.group |
||||
); |
||||
return order ? order.split("|") : []; |
||||
}, |
||||
|
||||
/** |
||||
* Save the order of elements. Called onEnd (when the item is dropped). |
||||
* @param {Sortable} sortable |
||||
*/ |
||||
set: function (sortable) { |
||||
var order = sortable.toArray(); |
||||
localStorage.setItem( |
||||
sortable.options.group, |
||||
order.join("|") |
||||
); |
||||
}, |
||||
}, |
||||
}); |
||||
} |
||||
|
||||
} |
||||
}, |
||||
complete: function () { |
||||
$("#spinner-div-lemon_apps").hide(); |
||||
|
||||
}, |
||||
}); |
||||
} |
||||
); // fin once
|
||||
} // fin exlude admin pages
|
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, once); |
@ -1,67 +0,0 @@ |
||||
(function ($, Drupal, once) { |
||||
"use strict"; |
||||
Drupal.behaviors.APIlemonMenuBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
|
||||
once("APIlemonMenuBehavior", "body", context).forEach(function () { |
||||
|
||||
$.ajax({ |
||||
url: Drupal.url("v1/api_lemon_pleiade/lemon-myapps-query"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "POST", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
var menuHtml = '<div class="accordion" id="accordionExample">'; |
||||
|
||||
for (var i = 0; i < donnees.myapplications.length; i++) { |
||||
// on récupère la longueur du json pour boucler sur le nombre afin de créer tout nos liens du menu
|
||||
menuHtml += |
||||
'<div style="max-width: 240px;"><div class="nav-small-cap has-arrow collapsed" data-bs-toggle="collapse" data-bs-target="#collapse' + |
||||
i + |
||||
'" aria-expanded="false" aria-controls="collapse' + |
||||
i + |
||||
'"><i class="mdi mdi-dots-horizontal"></i><span class="hide-menu">' + |
||||
donnees.myapplications[i].Category + // on récupère toute les catégories du json qu'on stocke dans une liste
|
||||
'</span></div><ul><div id="collapse' + |
||||
i + |
||||
'" class="accordion-collapse collapse" aria-labelledby="headingOne" ><div class="accordion-body">'; |
||||
for ( |
||||
var f = 0; |
||||
f < donnees.myapplications[i].Applications.length; |
||||
f++ |
||||
) { |
||||
// Pour chaque catégories, on récupère le nombre d'applications de la catégorie puis on boucle dessus
|
||||
const temp = Object.values( |
||||
donnees.myapplications[i].Applications[f] |
||||
); |
||||
|
||||
menuHtml += // on créé ensuite le lien avec le title du lien et le la description, pour créer le bloc
|
||||
'<a class="sidebar-link waves-effect waves-dark" title="' + |
||||
temp[0].AppDesc + |
||||
'" href="' + |
||||
temp[0].AppUri + |
||||
'" aria-expanded="false"><i data-feather="user" class="feather-icon"></i><span class="hide-menu">' + |
||||
Object.keys(donnees.myapplications[i].Applications[f]) + |
||||
" </span></a>"; |
||||
} |
||||
menuHtml += "</div></div></div>"; |
||||
} |
||||
|
||||
menuHtml += "</div>"; |
||||
|
||||
document.getElementById("menuTestLemon2").innerHTML = menuHtml; // on récupère l'entièreté du menu créé puis on le stocke dans la div contenant l'id menuTestLemon2
|
||||
feather.replace(); |
||||
}, |
||||
complete: function () { |
||||
$("#spinner-div-menu").hide(); |
||||
$("#spinner-div").hide(); //Request is complete so hide spinner
|
||||
}, |
||||
}); |
||||
|
||||
}); // fin once
|
||||
} // fin exlude admin pages
|
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, once); |
@ -0,0 +1,62 @@ |
||||
(function (Drupal, once) { |
||||
"use strict"; |
||||
Drupal.behaviors.APIlemonMenuBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
// once("APIlemonMenuBehavior", "body", context).forEach(function () {
|
||||
var xhr = new XMLHttpRequest(); |
||||
xhr.open("POST", Drupal.url("v1/api_lemon_pleiade/lemon-myapps-query")); |
||||
xhr.setRequestHeader("Content-Type", "application/json"); |
||||
xhr.onload = function () { |
||||
if (xhr.status === 200) { |
||||
var donnees = JSON.parse(xhr.responseText); |
||||
var menuHtml = '<div class="accordion" id="accordionExample">'; |
||||
|
||||
for (var i = 0; i < donnees.myapplications.length; i++) { |
||||
// on récupère la longueur du json pour boucler sur le nombre afin de créer tout nos liens du menu
|
||||
menuHtml += |
||||
'<div style="max-width: 240px;"><div class="nav-small-cap has-arrow collapsed" data-bs-toggle="collapse" data-bs-target="#collapse' + |
||||
i + |
||||
'" aria-expanded="false" aria-controls="collapse' + |
||||
i + |
||||
'"><i class="mdi mdi-dots-horizontal"></i><span class="hide-menu">' + |
||||
donnees.myapplications[i].Category + // on récupère toute les catégories du json qu'on stocke dans une liste
|
||||
'</span></div><ul><div id="collapse' + |
||||
i + |
||||
'" class="accordion-collapse collapse" aria-labelledby="headingOne" ><div class="accordion-body">'; |
||||
for ( |
||||
var f = 0; |
||||
f < donnees.myapplications[i].Applications.length; |
||||
f++ |
||||
) { |
||||
// Pour chaque catégories, on récupère le nombre d'applications de la catégorie puis on boucle dessus
|
||||
const temp = Object.values( |
||||
donnees.myapplications[i].Applications[f] |
||||
); |
||||
|
||||
menuHtml += // on créé ensuite le lien avec le title du lien et le la description, pour créer le bloc
|
||||
'<a class="sidebar-link waves-effect waves-dark" title="' + |
||||
temp[0].AppDesc + |
||||
'" href="' + |
||||
temp[0].AppUri + |
||||
'" aria-expanded="false"><i data-feather="user" class="feather-icon"></i><span class="hide-menu">' + |
||||
Object.keys(donnees.myapplications[i].Applications[f]) + |
||||
" </span></a>"; |
||||
} |
||||
menuHtml += "</div></div></div>"; |
||||
} |
||||
|
||||
menuHtml += "</div>"; |
||||
|
||||
document.getElementById("menuTestLemon2").innerHTML = menuHtml; // on récupère l'entièreté du menu créé puis on le stocke dans la div contenant l'id menuTestLemon2
|
||||
feather.replace(); |
||||
} |
||||
document.getElementById('spinner-div-sidebar').style.display = 'none'; |
||||
}; |
||||
xhr.send(JSON.stringify({})); |
||||
// }); // fin once
|
||||
} // fin exlude admin pages
|
||||
}, |
||||
}; |
||||
})(Drupal, once); |
@ -1,295 +0,0 @@ |
||||
(function ($, Drupal, once) { |
||||
"use strict"; |
||||
|
||||
Drupal.behaviors.APIlemonDataBehavior = { |
||||
attach: function (context, settings) { |
||||
// exclude admin pages
|
||||
|
||||
$("#collectiviteChoice").val(localStorage.getItem('collectivite_id')) |
||||
.find("option[value=" + localStorage.getItem('collectivite_id') +"]").attr('selected', true); |
||||
|
||||
|
||||
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
once("APIlemonDataBehavior", "body", context).forEach(function () { |
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
//Requete pour récupérer les collectivités du user actif
|
||||
//------------------------------------------------------
|
||||
|
||||
$.ajax({ |
||||
url: Drupal.url("sites/default/files/datasets/js/json_temporaire_group_entitites.json"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "GET", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
// console.log(donnees)
|
||||
var linkEntitie = ""; |
||||
|
||||
for (var i = 0; i < donnees.length; i++) { |
||||
linkEntitie += |
||||
'<option id="entitie_number_' + |
||||
donnees[i].id_e + |
||||
'" class="dropdown-item text-uppercase" value="' + |
||||
donnees[i].id_e + |
||||
'">' + |
||||
donnees[i].denomination + |
||||
"</option>"; |
||||
} |
||||
document.getElementById("collectiviteChoice").innerHTML += |
||||
linkEntitie; |
||||
}, |
||||
|
||||
}); |
||||
|
||||
//------------------------------------------------------
|
||||
//Chargement du bloc pastell au chargement initial
|
||||
//------------------------------------------------------
|
||||
|
||||
|
||||
$.ajax({ |
||||
url: Drupal.url( |
||||
"sites/default/files/datasets/js/documents_pastell_test.json" |
||||
),
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "GET", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
$("#pastell_block_id").hide(); |
||||
$("#spinner-div-pastell").show(); |
||||
$( "#pastell_block" ).remove(); |
||||
//--------------------------------------//
|
||||
|
||||
var document_coll = |
||||
'\ |
||||
<div class="col-lg-12" id="pastell_block"> \ |
||||
<div class="mb-2 shadow-lg">\ |
||||
<div class="card my-2">\ |
||||
<div class="card-header rounded-top" style="background-color: #1f3889">\ |
||||
<h4 class="card-title text-light">\ |
||||
Télétransmission : Derniers documents : Collectivité n°'+ localStorage.getItem('collectivite_id') +'<span></span>\ |
||||
</h4>\ |
||||
</div>\ |
||||
<div class="card-body">\ |
||||
<table class="table">\ |
||||
<thead>\ |
||||
<tr>\ |
||||
<th scope="col">Titre</th>\ |
||||
<th scope="col">Type</th>\ |
||||
<th scope="col">Dernière modification</th>\ |
||||
<th scope="col">Statut</th>\ |
||||
<th></th>\ |
||||
<th></th>\ |
||||
<th></th>\ |
||||
</tr>\ |
||||
</thead>\ |
||||
<tbody>'; |
||||
|
||||
for (var i = 0; i < donnees.length; i++) { |
||||
//TODO voir pour les différents états des documents
|
||||
// switch (donnees[i].last_action_display) {
|
||||
// case "":
|
||||
// // code block
|
||||
// break;
|
||||
// default:
|
||||
// // code block
|
||||
// }
|
||||
var objectDate = new Date(donnees[i].last_action_date); |
||||
|
||||
|
||||
var badge_color = "bg-success"; |
||||
var last_action = "En Cours de Création"; |
||||
var lien_pastell_detail = "https://pastelldev.ecollectivites.fr/Document/detail?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e; |
||||
var lien_pastell_edition = "https://pastelldev.ecollectivites.fr/Document/edition?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e; |
||||
var lien_pastell_supp = "https://pastelldev.ecollectivites.fr/Document/warning?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e + "&action=supression"; |
||||
document_coll += "\ |
||||
<tr>\ |
||||
<td>" + donnees[i].titre +"</td>\ |
||||
<td>" + donnees[i].type +"</td>\ |
||||
<td>" + String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + '</td>\ |
||||
<td><span class="badge ' +badge_color +'">'+ last_action +'</span></td>\ |
||||
<td><a href="' + lien_pastell_detail +'"><i data-feather="search" class="feather-icon"></i></a></td>\ |
||||
<td><a href="' + lien_pastell_edition +'"><i data-feather="edit" class="feather-icon"></i></a></td>\ |
||||
<td><a href="' + lien_pastell_supp +'"><i data-feather="trash-2" class="feather-icon"></i></a></td>\ |
||||
</tr>\ |
||||
'; |
||||
} |
||||
document_coll += "\ |
||||
</tbody>\ |
||||
</table>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
" |
||||
document.getElementById("pastell_block_id").innerHTML += document_coll; |
||||
feather.replace(); |
||||
}, |
||||
complete: function () { |
||||
$("#spinner-div-pastell").hide(); |
||||
$("#pastell_block_id").show(); |
||||
}, |
||||
}); |
||||
|
||||
//------------------------------------------------------
|
||||
//Changement de la collectivité au clic
|
||||
//------------------------------------------------------
|
||||
|
||||
|
||||
$("select.collectivitechoiceli").change(function(){ |
||||
|
||||
//------------------------------------------------------
|
||||
//Changement du cookie de la collectivité au clic
|
||||
//------------------------------------------------------
|
||||
if(localStorage.getItem('collectivite_id') != $(this).children("option:selected").val()){ |
||||
localStorage.setItem('collectivite_id', $(this).children("option:selected").val()); |
||||
} |
||||
|
||||
$.ajax({ |
||||
url: Drupal.url( |
||||
"sites/default/files/datasets/js/documents_pastell_test.json" |
||||
),
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "GET", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
//------------------------------------------------------
|
||||
//On cache le block le temps qu'il charge / on affiche le spinner
|
||||
//------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------
|
||||
//On supprime le block pastell pour le regénérer avec les nouvelles infos
|
||||
//------------------------------------------------------
|
||||
|
||||
$( "#pastell_block" ).remove(); |
||||
|
||||
if(donnees.length > 0){ |
||||
var document_coll = |
||||
'\ |
||||
<div class="col-lg-12" id="pastell_block"> \ |
||||
<div class="mb-2 shadow-lg">\ |
||||
<div class="card my-2">\ |
||||
<div class="card-header rounded-top" style="background-color: #1f3889">\ |
||||
<h4 class="card-title text-light">\ |
||||
Télétransmission : Derniers documents : Collectivité n°'+ localStorage.getItem('collectivite_id') +'<span></span>\ |
||||
</h4>\ |
||||
</div>\ |
||||
<div class="card-body">\ |
||||
<table class="table">\ |
||||
<thead>\ |
||||
<tr>\ |
||||
<th scope="col">Titre</th>\ |
||||
<th scope="col">Type</th>\ |
||||
<th scope="col">Dernière modification</th>\ |
||||
<th scope="col">Statut</th>\ |
||||
<th></th>\ |
||||
<th></th>\ |
||||
<th></th>\ |
||||
</tr>\ |
||||
</thead>\ |
||||
<tbody>'; |
||||
|
||||
for (var i = 0; i < donnees.length; i++) { |
||||
//------------------------------------------------------
|
||||
//TODO : Voir pour les états des documents
|
||||
|
||||
// switch (donnees[i].last_action_display) {
|
||||
// case "":
|
||||
// // code block
|
||||
// break;
|
||||
// default:
|
||||
// // code block
|
||||
// }
|
||||
//------------------------------------------------------
|
||||
|
||||
var objectDate = new Date(donnees[i].last_action_date); |
||||
|
||||
// TEMPORAIRE POUR AVOIR QUELQUE CHOSE A MONTRER
|
||||
var badge_color = "bg-success"; |
||||
var last_action = "En Cours de Création"; |
||||
// var badge_color = "bg-success";
|
||||
// var last_action = "En Cours de Création";
|
||||
var lien_pastell_detail = "https://pastelldev.ecollectivites.fr/Document/detail?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e; |
||||
var lien_pastell_edition = "https://pastelldev.ecollectivites.fr/Document/edition?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e; |
||||
var lien_pastell_supp = "https://pastelldev.ecollectivites.fr/Document/warning?id_d=" + donnees[i].id_d + "&id_e=" + donnees[i].id_e + "&action=supression"; |
||||
document_coll += "\ |
||||
<tr>\ |
||||
<td>" + donnees[i].titre +"</td>\ |
||||
<td>" + donnees[i].type +"</td>\ |
||||
<td>" + String(objectDate.getDate()).padStart(2, "0") + |
||||
"/" + |
||||
String(objectDate.getMonth() + 1).padStart(2, "0") + |
||||
"/" + |
||||
objectDate.getFullYear() + |
||||
" " + |
||||
String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + '</td>\ |
||||
<td><span class="badge ' +badge_color +'">'+ last_action +'</span></td>\ |
||||
<td><a href="' + lien_pastell_detail +'"><i data-feather="search" class="feather-icon"></i></a></td>\ |
||||
<td><a href="' + lien_pastell_edition +'"><i data-feather="edit" class="feather-icon"></i></a></td>\ |
||||
<td><a href="' + lien_pastell_supp +'"><i data-feather="trash-2" class="feather-icon"></i></a></td>\ |
||||
</tr>\ |
||||
'; |
||||
} |
||||
document_coll += "\ |
||||
</tbody>\ |
||||
</table>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
" |
||||
} |
||||
else |
||||
{ |
||||
var document_coll = |
||||
'\ |
||||
<div class="col-lg-12" id="pastell_block"> \ |
||||
<div class="mb-2 shadow-lg">\ |
||||
<div class="card my-2">\ |
||||
<div class="card-header rounded-top" style="background-color: #1f3889">\ |
||||
<h4 class="card-title text-light">\ |
||||
Télétransmission : Derniers documents : Collectivité n°'+ localStorage.getItem('collectivite_id') +'<span></span>\ |
||||
</h4>\ |
||||
</div>\ |
||||
<div class="card-body">\ |
||||
<div class="d-flex justify-content-center">\ |
||||
<h3>Aucun Documents Disponible</h3>\ |
||||
</div>\ |
||||
</tbody>\ |
||||
</table>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
' |
||||
} |
||||
document.getElementById("pastell_block_id").innerHTML = document_coll; |
||||
feather.replace(); |
||||
|
||||
}, |
||||
complete: function () { |
||||
//------------------------------------------------------
|
||||
//On affiche le block / on cache le spinner
|
||||
//------------------------------------------------------
|
||||
$("#spinner-div-pastell").hide(); |
||||
$("#pastell_block_id").show(); //Request is complete so hide spinner
|
||||
}, |
||||
});
|
||||
});
|
||||
}); // fin once
|
||||
} // fin exlude admin pages
|
||||
|
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, once); |
@ -1,104 +0,0 @@ |
||||
(function ($, Drupal, once) { |
||||
"use strict"; |
||||
|
||||
Drupal.behaviors.APIZimbradataBehavior = { |
||||
attach: function (context, settings) { |
||||
|
||||
if (!drupalSettings.path.currentPath.includes("admin")) { |
||||
once("APIZimbradataBehavior", "body", context).forEach(function () { |
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
//Requete pour récupérer les collectivités du user actif
|
||||
//------------------------------------------------------
|
||||
|
||||
$.ajax({ |
||||
url: Drupal.url("sites/default/files/datasets/js/zimbra_test.json"), // on appelle l'API de notre module LemonDataApiManager.php
|
||||
dataType: "json", // on spécifie bien que le type de données est en JSON
|
||||
type: "GET", |
||||
data: {}, |
||||
success: function (donnees) { |
||||
|
||||
if(donnees.m.length > 0){ |
||||
var linkEntitie = '<div id="zimbra_mail" class="col-lg-12">\ |
||||
<div class="shadow-lg">\ |
||||
<div class="card my-2">\ |
||||
<div class="card-header rounded-top" style="background-color: #1f3889">\ |
||||
<h4 class="card-title text-light">Boite de réception<span></span></h4>\ |
||||
</div>\ |
||||
<div class="card-body">\ |
||||
<table class="table mb-0">\ |
||||
<tbody>'; |
||||
|
||||
for (var i = 0; i < donnees.m.length; i++) { |
||||
// var mail_expediteur = donnees.m[i].e[1].a
|
||||
var id_expediteur = donnees.m[i].id |
||||
//------------------------------------------------------
|
||||
// oN CONVERTIT LA DATE DEPUIS TIMESTAMP ET ON RECUPERE HEURE / MINUTES
|
||||
//------------------------------------------------------
|
||||
var hour_mail = (donnees.m[i].d /1000 ); |
||||
var objectDate = new Date( |
||||
hour_mail * 1000
|
||||
); |
||||
linkEntitie += '<tr class="d-flex">\ |
||||
<th class="col d-flex align-items-center">\ |
||||
<img src="https://cdn-icons-png.flaticon.com/512/149/149071.png" alt="user" width="30" class="profile-pic rounded-circle" />\ |
||||
</th>\ |
||||
<th class="d-flex align-items-center w-25">'+ donnees.m[i].e[1].p +'</th>\ |
||||
<th scope="col">\ |
||||
<span class="d-block fw-bold">'+ donnees.m[i].su +'</span>\ |
||||
<span class="d-block fw-light">'+ donnees.m[i].fr.substr(0,100)+'... ' +'</span>\ |
||||
</th>\ |
||||
<th class="col d-flex align-items-center" class="fw-bold">' + String(objectDate.getHours()).padStart(2, "0") + |
||||
":" + |
||||
String(objectDate.getMinutes()).padStart(2, "0") + |
||||
'</th>\ |
||||
<th class="col d-flex align-items-center">\ |
||||
<a class="bidule hover-zoom" alt="constulter le mail" target="_blank" href="https://courriel.sitiv.fr/modern/email/Inbox/conversation/-'+ id_expediteur +'"><i data-feather="mail" class="feather-icon"></i></a>\ |
||||
</th>\ |
||||
</tr>\ |
||||
'; |
||||
|
||||
} |
||||
linkEntitie += ' </tbody></table>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
' |
||||
} |
||||
else |
||||
{ |
||||
var linkEntitie = '<div id="zimbra_mail" class="col-lg-12">\ |
||||
<div class="shadow-lg">\ |
||||
<div class="card my-2">\ |
||||
<div class="card-header rounded-top" style="background-color: #1f3889">\ |
||||
<h4 class="card-title text-light">Boite de réception<span></span></h4>\ |
||||
</div>\ |
||||
<div class="d-flex justify-content-center">\ |
||||
<h3 class="my-5">Aucun nouveau mail</h3>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
</div>\ |
||||
'; |
||||
}
|
||||
document.getElementById("zimbra_block_id").innerHTML += linkEntitie; |
||||
feather.replace(); |
||||
}, |
||||
complete: function () { |
||||
//------------------------------------------------------
|
||||
//On affiche le block / on cache le spinner
|
||||
//------------------------------------------------------
|
||||
$("#spinner-div-zimbra").hide(); |
||||
$("#zimbra_block_id").show(); //Request is complete so hide spinner
|
||||
}, |
||||
}); |
||||
|
||||
}); // fin once
|
||||
} // fin exlude admin pages
|
||||
|
||||
}, |
||||
}; |
||||
})(jQuery, Drupal, once); |
||||
|
@ -1,134 +0,0 @@ |
||||
[ |
||||
{ |
||||
"id_d": "NLS5LG7", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "creation", |
||||
"last_action_date": "2016-04-25 15:07:46", |
||||
"last_type": "mailsec-destinataire", |
||||
"type": "mailsec-destinataire", |
||||
"titre": "", |
||||
"creation": "2016-04-25 15:07:46", |
||||
"modification": "2016-04-25 15:07:46", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "creation" |
||||
}, |
||||
{ |
||||
"id_d": "BNllQi4", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "creation", |
||||
"last_action_date": "2016-04-25 15:07:28", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "", |
||||
"creation": "2016-04-25 15:07:28", |
||||
"modification": "2016-04-25 15:07:28", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "creation" |
||||
}, |
||||
{ |
||||
"id_d": "Z6EOCKB", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "termine", |
||||
"last_action_date": "2014-11-06 17:33:08", |
||||
"last_type": "entretien-professionnel", |
||||
"type": "entretien-professionnel", |
||||
"titre": "", |
||||
"creation": "2014-11-06 17:32:40", |
||||
"modification": "2014-11-06 17:33:04", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "termine" |
||||
}, |
||||
{ |
||||
"id_d": "gN9wx0G", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "envoi", |
||||
"last_action_date": "2013-09-19 16:42:18", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "test adu", |
||||
"creation": "2013-09-19 16:41:47", |
||||
"modification": "2013-09-19 16:42:16", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "envoi" |
||||
}, |
||||
{ |
||||
"id_d": "BpQZYt4", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "reception", |
||||
"last_action_date": "2013-08-22 14:41:53", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "coucou", |
||||
"creation": "2013-08-22 14:39:59", |
||||
"modification": "2013-08-22 14:40:56", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "reception" |
||||
}, |
||||
{ |
||||
"id_d": "i77LBVs", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "reception", |
||||
"last_action_date": "2013-08-22 14:39:03", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "Test cdg", |
||||
"creation": "2013-08-22 14:28:46", |
||||
"modification": "2013-08-22 14:29:52", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "reception" |
||||
} |
||||
] |
@ -1,134 +0,0 @@ |
||||
[ |
||||
{ |
||||
"id_d": "NLS5LG7", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "creation", |
||||
"last_action_date": "2016-04-25 15:07:46", |
||||
"last_type": "mailsec-destinataire", |
||||
"type": "mailsec-destinataire", |
||||
"titre": "", |
||||
"creation": "2016-04-25 15:07:46", |
||||
"modification": "2016-04-25 15:07:46", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "creation" |
||||
}, |
||||
{ |
||||
"id_d": "BNllQi4", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "creation", |
||||
"last_action_date": "2016-04-25 15:07:28", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "", |
||||
"creation": "2016-04-25 15:07:28", |
||||
"modification": "2016-04-25 15:07:28", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "creation" |
||||
}, |
||||
{ |
||||
"id_d": "Z6EOCKB", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "termine", |
||||
"last_action_date": "2014-11-06 17:33:08", |
||||
"last_type": "entretien-professionnel", |
||||
"type": "entretien-professionnel", |
||||
"titre": "", |
||||
"creation": "2014-11-06 17:32:40", |
||||
"modification": "2014-11-06 17:33:04", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "termine" |
||||
}, |
||||
{ |
||||
"id_d": "gN9wx0G", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "envoi", |
||||
"last_action_date": "2013-09-19 16:42:18", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "test adu", |
||||
"creation": "2013-09-19 16:41:47", |
||||
"modification": "2013-09-19 16:42:16", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "envoi" |
||||
}, |
||||
{ |
||||
"id_d": "BpQZYt4", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "reception", |
||||
"last_action_date": "2013-08-22 14:41:53", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "coucou", |
||||
"creation": "2013-08-22 14:39:59", |
||||
"modification": "2013-08-22 14:40:56", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "reception" |
||||
}, |
||||
{ |
||||
"id_d": "i77LBVs", |
||||
"id_e": "4", |
||||
"role": "editeur", |
||||
"last_action": "reception", |
||||
"last_action_date": "2013-08-22 14:39:03", |
||||
"last_type": "mailsec", |
||||
"type": "mailsec", |
||||
"titre": "Test cdg", |
||||
"creation": "2013-08-22 14:28:46", |
||||
"modification": "2013-08-22 14:29:52", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"date_inscription": "2013-08-22 10:03:26", |
||||
"etat": "0", |
||||
"entite_mere": "0", |
||||
"centre_de_gestion": "0", |
||||
"is_active": "1", |
||||
"entite_base": "CDG85", |
||||
"entite": [], |
||||
"last_action_display": "reception" |
||||
} |
||||
] |
@ -1,298 +0,0 @@ |
||||
[ |
||||
{ |
||||
"id_e": "36", |
||||
"denomination": "ACHARDS (LES)", |
||||
"siren": "200065795", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "31", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "1", |
||||
"denomination": "ADULLACT", |
||||
"siren": "491011698", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "5", |
||||
"denomination": "AIZENAY", |
||||
"siren": "218500031", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "6", |
||||
"denomination": "ANTIGNY", |
||||
"siren": "218500056", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "28", |
||||
"denomination": "BOUFFERE", |
||||
"siren": "218500270", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "20", |
||||
"denomination": "CCM CANTON DE ROCHESERVIERE", |
||||
"siren": "248500514", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "16", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "4", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"type": "centre_de_gestion", |
||||
"centre_de_gestion": "0", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "31", |
||||
"denomination": "CDG85 - UNITE PAIE", |
||||
"siren": "288500028", |
||||
"type": "centre_de_gestion", |
||||
"centre_de_gestion": "0", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "21", |
||||
"denomination": "CHALLANS", |
||||
"siren": "218500478", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "18", |
||||
"denomination": "CIRIL", |
||||
"siren": "305163040", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "22", |
||||
"denomination": "Doix", |
||||
"siren": "218500809", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "23", |
||||
"denomination": "E-COLLECTIVITES VENDEE", |
||||
"siren": "200043115", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "3", |
||||
"denomination": "FONTENAY LE COMTE (Mairie)", |
||||
"siren": "218500924", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "24", |
||||
"denomination": "FORMATION", |
||||
"siren": "200043115", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "17", |
||||
"denomination": "FOUGERE", |
||||
"siren": "218500932", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "13", |
||||
"denomination": "L'OIE", |
||||
"siren": "218501658", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "29", |
||||
"denomination": "LUCON - CCM SUD VENDEE LITTORAL", |
||||
"siren": "200073260", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "2", |
||||
"denomination": "MAIRIE LA ROCHE SUR YON", |
||||
"siren": "441663689", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "19", |
||||
"denomination": "MAREUIL SUR LAY DISSAIS", |
||||
"siren": "218501351", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "27", |
||||
"denomination": "MONTAIGU", |
||||
"siren": "218501468", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "12", |
||||
"denomination": "POUZAUGES", |
||||
"siren": "218501823", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "10", |
||||
"denomination": "SAINT HILAIRE DE RIEZ", |
||||
"siren": "218502268", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "32", |
||||
"denomination": "SAINT HILAIRE DES LOGES", |
||||
"siren": "218502276", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "11", |
||||
"denomination": "SAINT MESMIN", |
||||
"siren": "268501756", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "9", |
||||
"denomination": "SYDEV", |
||||
"siren": "258500230", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "30", |
||||
"denomination": "SYDEV-CHORUS", |
||||
"siren": "200042489", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "7", |
||||
"denomination": "TRIVALIS", |
||||
"siren": "258502962", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "8", |
||||
"denomination": "VENDEE EAU", |
||||
"siren": "258500222", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "26", |
||||
"denomination": "DSI formation", |
||||
"siren": "0", |
||||
"type": "service", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "24" |
||||
}, |
||||
{ |
||||
"id_e": "25", |
||||
"denomination": "Service RH formation", |
||||
"siren": "0", |
||||
"type": "service", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "24" |
||||
}, |
||||
{ |
||||
"id_e": "33", |
||||
"denomination": "St Hilaire des Loges - Service administration g\u00e9n\u00e9rale", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "32" |
||||
}, |
||||
{ |
||||
"id_e": "34", |
||||
"denomination": "St Hilaire des Loges - Service RH", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "32" |
||||
}, |
||||
{ |
||||
"id_e": "37", |
||||
"denomination": "ACHARDS (LES) - Administration générale", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "31", |
||||
"entite_mere": "36" |
||||
}, |
||||
{ |
||||
"id_e": "38", |
||||
"denomination": "ACHARDS (LES) - Ressources humaines", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "31", |
||||
"entite_mere": "36" |
||||
}, |
||||
{ |
||||
"id_e": "15", |
||||
"denomination": "Administration g\u00e9n\u00e9rale", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "5" |
||||
}, |
||||
{ |
||||
"id_e": "14", |
||||
"denomination": "Service RH", |
||||
"siren": "0", |
||||
"type": "service", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "5" |
||||
} |
||||
] |
@ -1,298 +0,0 @@ |
||||
[ |
||||
{ |
||||
"id_e": "36", |
||||
"denomination": "ACHARDS (LES)", |
||||
"siren": "200065795", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "31", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "1", |
||||
"denomination": "ADULLACT", |
||||
"siren": "491011698", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "5", |
||||
"denomination": "AIZENAY", |
||||
"siren": "218500031", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "6", |
||||
"denomination": "ANTIGNY", |
||||
"siren": "218500056", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "28", |
||||
"denomination": "BOUFFERE", |
||||
"siren": "218500270", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "20", |
||||
"denomination": "CCM CANTON DE ROCHESERVIERE", |
||||
"siren": "248500514", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "16", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "4", |
||||
"denomination": "CDG85", |
||||
"siren": "288500028", |
||||
"type": "centre_de_gestion", |
||||
"centre_de_gestion": "0", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "31", |
||||
"denomination": "CDG85 - UNITE PAIE", |
||||
"siren": "288500028", |
||||
"type": "centre_de_gestion", |
||||
"centre_de_gestion": "0", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "21", |
||||
"denomination": "CHALLANS", |
||||
"siren": "218500478", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "18", |
||||
"denomination": "CIRIL", |
||||
"siren": "305163040", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "22", |
||||
"denomination": "Doix", |
||||
"siren": "218500809", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "23", |
||||
"denomination": "E-COLLECTIVITES VENDEE", |
||||
"siren": "200043115", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "3", |
||||
"denomination": "FONTENAY LE COMTE (Mairie)", |
||||
"siren": "218500924", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "24", |
||||
"denomination": "FORMATION", |
||||
"siren": "200043115", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "17", |
||||
"denomination": "FOUGERE", |
||||
"siren": "218500932", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "13", |
||||
"denomination": "L'OIE", |
||||
"siren": "218501658", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "29", |
||||
"denomination": "LUCON - CCM SUD VENDEE LITTORAL", |
||||
"siren": "200073260", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "2", |
||||
"denomination": "MAIRIE LA ROCHE SUR YON", |
||||
"siren": "441663689", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "19", |
||||
"denomination": "MAREUIL SUR LAY DISSAIS", |
||||
"siren": "218501351", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "27", |
||||
"denomination": "MONTAIGU", |
||||
"siren": "218501468", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "12", |
||||
"denomination": "POUZAUGES", |
||||
"siren": "218501823", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "10", |
||||
"denomination": "SAINT HILAIRE DE RIEZ", |
||||
"siren": "218502268", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "32", |
||||
"denomination": "SAINT HILAIRE DES LOGES", |
||||
"siren": "218502276", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "11", |
||||
"denomination": "SAINT MESMIN", |
||||
"siren": "268501756", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "9", |
||||
"denomination": "SYDEV", |
||||
"siren": "258500230", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "30", |
||||
"denomination": "SYDEV-CHORUS", |
||||
"siren": "200042489", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "7", |
||||
"denomination": "TRIVALIS", |
||||
"siren": "258502962", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "8", |
||||
"denomination": "VENDEE EAU", |
||||
"siren": "258500222", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "0" |
||||
}, |
||||
{ |
||||
"id_e": "26", |
||||
"denomination": "DSI formation", |
||||
"siren": "0", |
||||
"type": "service", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "24" |
||||
}, |
||||
{ |
||||
"id_e": "25", |
||||
"denomination": "Service RH formation", |
||||
"siren": "0", |
||||
"type": "service", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "24" |
||||
}, |
||||
{ |
||||
"id_e": "33", |
||||
"denomination": "St Hilaire des Loges - Service administration g\u00e9n\u00e9rale", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "32" |
||||
}, |
||||
{ |
||||
"id_e": "34", |
||||
"denomination": "St Hilaire des Loges - Service RH", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "32" |
||||
}, |
||||
{ |
||||
"id_e": "37", |
||||
"denomination": "ACHARDS (LES) - Administration générale", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "31", |
||||
"entite_mere": "36" |
||||
}, |
||||
{ |
||||
"id_e": "38", |
||||
"denomination": "ACHARDS (LES) - Ressources humaines", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "31", |
||||
"entite_mere": "36" |
||||
}, |
||||
{ |
||||
"id_e": "15", |
||||
"denomination": "Administration g\u00e9n\u00e9rale", |
||||
"siren": "000000000", |
||||
"type": "collectivite", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "5" |
||||
}, |
||||
{ |
||||
"id_e": "14", |
||||
"denomination": "Service RH", |
||||
"siren": "0", |
||||
"type": "service", |
||||
"centre_de_gestion": "4", |
||||
"entite_mere": "5" |
||||
} |
||||
] |
Loading…
Reference in new issue