modification to add Font Awesome icons v6

e_collectivites-version
Quentin Marchand 1 year ago
parent 0911cee62b
commit 0b9e693248
  1. 1
      api_lemon_pleiade/api_lemon_pleiade.libraries.yml
  2. 51
      api_lemon_pleiade/css/api_lemon_pleiade.css
  3. 4
      api_lemon_pleiade/js/api_lemon_pleiade_desktop_blocks.js
  4. 9
      api_lemon_pleiade/js/api_lemon_pleiade_sidebar_menu.js
  5. 6
      api_pastell_pleiade/js/api_pastell_menu.js
  6. 4
      api_zimbra_pleiade/js/api_zimbra_add_img_user_pleiade.js
  7. 4
      api_zimbra_pleiade/js/api_zimbra_agenda_pleiade.js
  8. 210
      api_zimbra_pleiade/js/api_zimbra_pleiade.js
  9. 17
      datatable_pleiade/js/datatable_pleiade.js
  10. 7
      notification_module_pleiade/js/notification_module_pleiade.js

@ -11,3 +11,4 @@ api_lemon_pleiade_css:
css:
theme:
css/api_lemon_pleiade.css: {}

@ -1,9 +1,9 @@
:root {
--global-color: #1f3889;
}
#menuTestLemon2 .sidebar-link, #menuPastell .sidebar-link, #menuLogMetiers .sidebar-link {
padding: 2px 0 0 5px!important;
}
#menuLemon .sidebar-link, #menuPastell .sidebar-link, #menuLogMetiers .sidebar-link {
padding: 2px 0 0 5px !important;
display: flex;
white-space: nowrap;
align-items: center;
@ -28,24 +28,51 @@
/* white-space: nowrap; */
cursor: pointer;
}
.accordion-body {
padding: 0rem 0rem 0rem 0!important;
padding: 0rem 0rem 0rem 0 !important;
}
.feather{
margin: 0 2px 0 5px!important;
.feather {
margin: 0 2px 0 5px !important;
}
div.long-category span.hide-menu{
div.long-category span.hide-menu {
line-height: 20px;
padding: 0px 12px 0 0px;
padding: 0px 12px 0 0px;
}
#block_appli_lemon div:first-child i , #block_appli_lemon div:first-child img{
#block_appli_lemon div:first-child i, #block_appli_lemon div:first-child img {
width: 50px;
height: 50px;
}
#block_appli_lemon a:hover{
#block_appli_lemon a:hover {
color: var(--global-color);
}
#main-wrapper[data-sidebartype=mini-sidebar] #sidebarnav:not(.extended_menu) i.fa:not(.fa-book) {
margin: 0 15px !important;
}
#menuLemon .sidebar-link, .sidebar-nav ul .sidebar-item .sidebar-link {
padding: 2px 0 0 5px;
display: flex;
white-space: nowrap;
align-items: center;
position: relative;
line-height: 25px;
font-size: 16px;
opacity: 0.6;
color: #fff;
border-left: 3px solid transparent;
}
#menuLemon .sidebar-nav .has-arrow::after {
top: 15px !important;
right: 3px !important;
}
#lemon_block_id i{
color: inherit!important;
}

@ -42,7 +42,7 @@
const appLogoURL = drupalSettings.api_lemon_pleiade.field_lemon_url + "/static/common/apps/" + appLogo;
logoHTML = `<div class="w-25 d-flex justify-content-end px-2"><img src="${appLogoURL}" alt="App Logo" class="app-logo"></div>`;
} else {
logoHTML = `<div class="w-25 d-flex justify-content-end px-2"><i class="fa-3x fa-solid fa-${appLogo}"></i></div>`;
logoHTML = `<div class="w-25 d-flex justify-content-end px-2"><i class="fa fa-3x fa-solid fa-${appLogo}"></i></div>`;
}
}
else
@ -82,4 +82,4 @@
} // fin only on frontpage
},
};
})(Drupal, drupalSettings);
})(Drupal, drupalSettings);

@ -56,9 +56,9 @@
let Icon;
if (appLogo && !hasImageExtension) {
Icon = '<i class="feather fa-solid fa-' + appLogo + '"></i>';
Icon = '<i class="fa fa-solid fa-' + appLogo + '"></i>';
} else {
Icon = '<i data-feather="arrow-right" class="feather-icon"></i>';
Icon = '<i class="fa fa-arrow-right" aria-hidden="true"></i>';
}
menuHtml += // on créé ensuite le lien avec le title du lien et le la description, pour créer le bloc
@ -78,8 +78,7 @@
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("menuLemon").innerHTML = menuHtml; // on récupère l'entièreté du menu créé puis on le stocke dans la div contenant l'id menuLemon
// Fo nction pour gérer le changement de la case à cocher
function handleCheckboxChange() {
const checkbox = document.querySelector('input[name="extended_menu"]');
@ -166,4 +165,4 @@
} // fin exlude admin pages
},
};
})(Drupal, once);
})(Drupal, once);

@ -30,15 +30,15 @@
(localStorage.getItem('extended_menu') === '1' ? ' show' : '') + // Add 'show' class if localStorage has extended_menu value of 1
'" aria-labelledby="headingOne" style="">\
<a class="sidebar-link waves-effect waves-dark" title="Lister les documents" target="_blank" href="' + url_pastell + '/Document/list?id_e=' + id_e + '&type=' + key + '" aria-expanded="false">\
<i data-feather="arrow-right" class="feather-icon"></i><span class="hide-menu">Lister les documents</span></a>\
<i class="fa fa-arrow-right" aria-hidden="true"></i><span class="hide-menu px-2">Lister les documents</span></a>\
<a class="sidebar-link waves-effect waves-dark" title="Créer un document" target="_blank" href="' + url_pastell + '/Document/new?id_e=' + id_e + '&type=' + key + '" aria-expanded="false">\
<i data-feather="arrow-right" class="feather-icon"></i><span class="hide-menu">Créer un document</span></a>\
<i class="fa fa-arrow-right" aria-hidden="true"></i><span class="hide-menu px-2">Créer un document</span></a>\
</div></div>';
}
// Set the menu_a_remplir as innerHTML of menu_Pastell
menu_Pastell.innerHTML = menu_a_remplir
feather.replace();
}
}

@ -51,10 +51,6 @@
};
xhr.onloadend = function () {
// feather icons
feather.replace();
};
xhr.send();

@ -93,10 +93,6 @@ for (var k = 0; k < donneesArray.length; k++) {
};
xhr.onloadend = function () {
// feather icons
feather.replace();
};
xhr.send();

@ -1,26 +1,36 @@
(function (Drupal, once, drupalSettings) {
"use strict";
Drupal.behaviors.APIzimbraDataHistoryBehavior = {
attach: function (context, settings) {
// Load on front page only,
if (drupalSettings.path.isFront && drupalSettings.api_zimbra_pleiade.field_zimbra_mail) {
once("APIzimbraDataHistoryBehavior", "#zimbra_block_mail_id", context).forEach(
function () {
// show spinner while ajax is loading
document.getElementById("zimbra_block_mail_id").innerHTML = drupalSettings.api_lemon_pleiade.spinner;
var xhr = new XMLHttpRequest();
// URL DE TEST POUR LE MOMENT COONF DANS l'ADMIN DU MODULE : sites/default/files/datasets/js/zimbra_test.json
// xhr.open("GET", Drupal.url("v1/api_zimbra_pleiade/zimbra_mail_query"));
xhr.open("GET", Drupal.url("v1/api_zimbra_pleiade/zimbra_mails_query"));
xhr.responseType = "json";
"use strict";
Drupal.behaviors.APIzimbraDataHistoryBehavior = {
attach: function (context, settings) {
// Load on front page only,
if (
drupalSettings.path.isFront &&
drupalSettings.api_zimbra_pleiade.field_zimbra_mail
) {
once(
"APIzimbraDataHistoryBehavior",
"#zimbra_block_mail_id",
context
).forEach(function () {
// show spinner while ajax is loading
document.getElementById("zimbra_block_mail_id").innerHTML =
drupalSettings.api_lemon_pleiade.spinner;
var xhr = new XMLHttpRequest();
// URL DE TEST POUR LE MOMENT COONF DANS l'ADMIN DU MODULE : sites/default/files/datasets/js/zimbra_test.json
// xhr.open("GET", Drupal.url("v1/api_zimbra_pleiade/zimbra_mail_query"));
xhr.open(
"GET",
Drupal.url("v1/api_zimbra_pleiade/zimbra_mails_query")
);
xhr.responseType = "json";
xhr.onload = function () {
if (xhr.status === 200) {
var linkEntitie = ''; // Initialiser la variable linkEntitie ici
var donnees = xhr.response; // Assurez-vous que xhr.response contient un tableau d'objets "donnees"
//console.log(donneesArray)
var linkEntitie =
'<div id="zimbra_mail" class="col-lg-12 mb-2">\
xhr.onload = function () {
if (xhr.status === 200) {
var linkEntitie = ""; // Initialiser la variable linkEntitie ici
var donnees = xhr.response; // Assurez-vous que xhr.response contient un tableau d'objets "donnees"
//console.log(donneesArray)
var linkEntitie =
'<div id="zimbra_mail" class="col-lg-12 mb-2">\
<div class="card">\
<div class="card-header rounded-top bg-white border-bottom rounded-top">\
<h4 class="card-title text-dark py-2">Boite de réception<span></span></h4>\
@ -30,86 +40,96 @@ var linkEntitie =
<table class="table mb-0">\
<tbody>';
console.log(donnees);
var linkEntities = "";
if (donnees.userData.Body.SearchResponse.c) {
for (
var i = 0;
i < donnees.userData.Body.SearchResponse.c.length;
i++
) {
// var mail_expediteur = donnees.userData.Body.SearchResponse.c[i].e[1].a
var id_expediteur =
donnees.userData.Body.SearchResponse.c[i].id;
//------------------------------------------------------
// ON CONVERTIT LA DATE DEPUIS TIMESTAMP ET ON RECUPERE HEURE / MINUTES
//------------------------------------------------------
var hour_mail =
donnees.userData.Body.SearchResponse.c[i].d / 1000;
var objectDate = new Date(hour_mail * 1000);
console.log(donnees);
var linkEntities = '';
if (donnees.userData.Body.SearchResponse.c) {
for (var i = 0; i < donnees.userData.Body.SearchResponse.c.length; i++) {
// var mail_expediteur = donnees.userData.Body.SearchResponse.c[i].e[1].a
var id_expediteur = donnees.userData.Body.SearchResponse.c[i].id
//------------------------------------------------------
// ON CONVERTIT LA DATE DEPUIS TIMESTAMP ET ON RECUPERE HEURE / MINUTES
//------------------------------------------------------
var hour_mail = (donnees.userData.Body.SearchResponse.c[i].d /1000 );
var objectDate = new Date(
hour_mail * 1000
);
linkEntitie += '<tr class="d-inline-flex mail_content w-100" mail-expe="'+ donnees.userData.Body.SearchResponse.c[i].e[0].a +'">\
linkEntitie +=
'<tr class="d-inline-flex mail_content w-100" mail-expe="' +
donnees.userData.Body.SearchResponse.c[i].e[0].a +
'">\
<th class="col d-flex align-items-center profile-picture"></th>\
<th class="d-flex justify-content-center expediteur align-items-center">'+ donnees.userData.Body.SearchResponse.c[i].e[0].p +'</th>\
<th class="d-flex justify-content-center expediteur align-items-center">' +
donnees.userData.Body.SearchResponse.c[i].e[0].p +
'</th>\
<th scope="col" class="content-mail">\
<span class="d-block fw-bold">'+ donnees.userData.Body.SearchResponse.c[i].su +'</span>\
<span class="d-block fw-light">'+ donnees.userData.Body.SearchResponse.c[i].fr.substr(0,65)+'... ' +'</span>\
<span class="d-block fw-bold">' +
donnees.userData.Body.SearchResponse.c[i].su +
'</span>\
<span class="d-block fw-light">' +
donnees.userData.Body.SearchResponse.c[i].fr.substr(0, 65) +
"... " +
'</span>\
</th>\
<th class="col mailTime d-flex align-items-center" class="fw-bold">' + String(objectDate.getHours()).padStart(2, "0") +
":" +
String(objectDate.getMinutes()).padStart(2, "0") +
'</th>\
<th class="col mailTime d-flex align-items-center" class="fw-bold">' +
String(objectDate.getHours()).padStart(2, "0") +
":" +
String(objectDate.getMinutes()).padStart(2, "0") +
'</th>\
<th class="col readMail d-flex align-items-center">\
<a class="hover-zoom" alt="constulter le mail" target="_blank" href="'+ donnees.domainEntry +'modern/email/Inbox/conversation/'+ id_expediteur +'"><i data-feather="mail" class="feather-icon"></i></a>\
<a class="hover-zoom" alt="constulter le mail" target="_blank" href="' +
donnees.domainEntry +
"modern/email/Inbox/conversation/" +
id_expediteur +
'"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>\
</th>\
</tr>\
';
}
}
else
{
var linkEntitie = '<div id="zimbra_mail " class="col-lg-12 mb-2">\
<div class="card">\
<div class="card-header rounded-top bg-white border-bottom rounded-top">\
<h4 class="card-title text-dark py-2">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>\
';
}
}
linkEntitie += '</tbody></table></div>\
</div>\
</div>\
</div>\
</div>\
'
document.getElementById("zimbra_block_mail_id").innerHTML =
linkEntitie;
};
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 () {
// feather icons
feather.replace();
};
}
} else {
var linkEntitie =
'<div id="zimbra_mail " class="col-lg-12 mb-2">\
<div class="card">\
<div class="card-header rounded-top bg-white border-bottom rounded-top">\
<h4 class="card-title text-dark py-2">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>\
';
}
}
linkEntitie +=
"</tbody></table></div>\
</div>\
</div>\
</div>\
</div>\
";
document.getElementById("zimbra_block_mail_id").innerHTML =
linkEntitie;
};
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 () {
};
xhr.send();
}); // fin once function
}
},
};
})(Drupal, once, drupalSettings);
xhr.send();
}); // fin once function
}
},
};
})(Drupal, once, drupalSettings);

@ -123,7 +123,7 @@
var lien_nc_detail =
'<a target="_blank" href="' +
donnees[i].fileUrl +
'"><i data-feather="search" class="feather-icon"></i></a>';
'"><i class="fa fa-2x fa-eye" aria-hidden="true"></i></a>';
var document_row =
"\
<tr>\
@ -141,7 +141,7 @@
"</td>\
<td><div class='btn-group dropend'>\
<button type='button' class='btn dropdown-toggle' data-bs-toggle='dropdown' aria-expanded='false'>\
<i data-feather='more-horizontal' class='feather-icon' id='dropdown-icon'></i>\
<i class='fa fa-lg fa-ellipsis-h d-flex align-items-center justify-content-center' id='dropdown-icon'></i>\
</button>\
<ul class='dropdown-menu'>\
" +
@ -340,19 +340,19 @@
donnees[i].id_d +
"&id_e=" +
donnees[i].id_e +
'"><i data-feather="search" class="feather-icon"></i></a>';
'"><i class="fa fa-2x fa-eye" aria-hidden="true"></i></a>';
if (
last_etat == "creation" ||
last_etat == "modification"
) {
var lien_pastell_edition =
'<a target="_blank" href="' +
'<a class="d-flex" target="_blank" href="' +
pastell_url +
"Document/edition?id_d=" +
donnees[i].id_d +
"&id_e=" +
donnees[i].id_e +
'"><i data-feather="edit" class="feather-icon"></i></a>';
'"><i class="fa fa-2x fa-pencil-square-o" aria-hidden="true"></i></a>';
var lien_pastell_supp =
'<a target="_blank" href="' +
pastell_url +
@ -360,7 +360,7 @@
donnees[i].id_d +
"&id_e=" +
donnees[i].id_e +
'&action=supression"><i data-feather="trash-2" class="feather-icon"></i></a>';
'&action=supression"><i class="fa fa-2x fa-trash-o" aria-hidden="true"></i></a>';
}
document_coll +=
"\
@ -379,7 +379,7 @@
"</td>\
<td><div class='btn-group dropend'>\
<button type='button' class='btn dropdown-toggle' data-bs-toggle='dropdown' aria-expanded='false'>\
<i data-feather='more-horizontal' class='feather-icon' id='dropdown-icon'></i>\
<i class='fa fa-lg fa-ellipsis-h' id='dropdown-icon'></i>\
</button>\
<ul class='dropdown-menu'>\
" +
@ -422,8 +422,7 @@
console.log("AJAX call timed out");
};
xhr.onloadend = function () {
// feather icon for doc links
feather.replace();
// Datatables effect on doc list
$("#tablealldocs").DataTable({
columns: [

@ -25,7 +25,7 @@
document.getElementById("notification_alert"); // replace "myDiv" with the actual id of your div
displayNotif.style.display = "block";
};
var svg_bell = document.querySelector(".alert_popup svg"); // if notifictation hide svg bell
var svg_bell = document.querySelector(".alert_popup i"); // if notifictation hide svg bell
if (svg_bell) {
svg_bell.style.display = "none";
}
@ -33,7 +33,10 @@
if (div_alert) {
div_alert.classList.add("notification_scale");
div_alert.innerHTML +=
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="25" height="25" viewBox="0 0 24 24" fill="none"stroke="currentColor" stroke-width="2" xml:space="preserve" style="cursor: pointer;"><defs></defs><g transform="matrix(1 0 0 1 12 12)" ><g style=""><g transform="matrix(1 0 0 1 0 -2.5)" ><path style="stroke: #1f3889; stroke-width: 2; stroke-dasharray: none; stroke-linecap: round; stroke-dashoffset: 0; stroke-linejoin: round; stroke-miterlimit: 4; fill: none; fill-rule: nonzero; opacity: 1;" transform=" translate(-12, -9.5)" d="M 18 8 A 6 6 0 0 0 6 8 c 0 7 -3 9 -3 9 h 18 s -3 -2 -3 -9" stroke-linecap="round" /></g><g transform="matrix(1 0 0 1 0 9.5)" ><path style="stroke: #1f3889; stroke-width: 2; stroke-dasharray: none; stroke-linecap: round; stroke-dashoffset: 0; stroke-linejoin: round; stroke-miterlimit: 4; fill: none; fill-rule: nonzero; opacity: 1;" transform=" translate(-12, -21.5)" d="M 13.73 21 a 2 2 0 0 1 -3.46 0" stroke-linecap="round" /></g></g></g><g transform="matrix(0.07 0 0 0.07 19.5 3.33)" ><circle style="stroke: rgb(255,0,0); stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: rgb(255,0,0); fill-rule: nonzero; opacity: 1;" vector-effect="non-scaling-stroke" cx="0" cy="0" r="40" /></g></svg>';
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="32" height="32">\
<path d="M224 0c-17.7 0-32 14.3-32 32V49.9C119.5 61.4 64 124.2 64 200v33.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416H424c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4V200c0-75.8-55.5-138.6-128-150.1V32c0-17.7-14.3-32-32-32zm0 96h8c57.4 0 104 46.6 104 104v33.4c0 47.9 13.9 94.6 39.7 134.6H72.3C98.1 328 112 281.3 112 233.4V200c0-57.4 46.6-104 104-104h8zm64 352H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z"/>\
<ellipse style="fill: rgb(255, 0, 0);" cx="387.29" cy="61.608" rx="54.131" ry="53.832"/>\
</svg>';
}
for (var i = 0; i < donnees.length; i++) {
var date_creation = donnees[i].creation_date;

Loading…
Cancel
Save