diff --git a/api_lemon_pleiade/api_lemon_pleiade.libraries.yml b/api_lemon_pleiade/api_lemon_pleiade.libraries.yml index 56867e5..cc191cb 100644 --- a/api_lemon_pleiade/api_lemon_pleiade.libraries.yml +++ b/api_lemon_pleiade/api_lemon_pleiade.libraries.yml @@ -11,3 +11,4 @@ api_lemon_pleiade_css: css: theme: css/api_lemon_pleiade.css: {} + diff --git a/api_lemon_pleiade/css/api_lemon_pleiade.css b/api_lemon_pleiade/css/api_lemon_pleiade.css index c6627c4..9d50bb2 100644 --- a/api_lemon_pleiade/css/api_lemon_pleiade.css +++ b/api_lemon_pleiade/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; +} \ No newline at end of file diff --git a/api_lemon_pleiade/js/api_lemon_pleiade_desktop_blocks.js b/api_lemon_pleiade/js/api_lemon_pleiade_desktop_blocks.js index b437431..82b66df 100644 --- a/api_lemon_pleiade/js/api_lemon_pleiade_desktop_blocks.js +++ b/api_lemon_pleiade/js/api_lemon_pleiade_desktop_blocks.js @@ -42,7 +42,7 @@ const appLogoURL = drupalSettings.api_lemon_pleiade.field_lemon_url + "/static/common/apps/" + appLogo; logoHTML = `
`; } else { - logoHTML = `
`; + logoHTML = `
`; } } else @@ -82,4 +82,4 @@ } // fin only on frontpage }, }; -})(Drupal, drupalSettings); \ No newline at end of file +})(Drupal, drupalSettings); diff --git a/api_lemon_pleiade/js/api_lemon_pleiade_sidebar_menu.js b/api_lemon_pleiade/js/api_lemon_pleiade_sidebar_menu.js index 9acfc5d..b660d09 100644 --- a/api_lemon_pleiade/js/api_lemon_pleiade_sidebar_menu.js +++ b/api_lemon_pleiade/js/api_lemon_pleiade_sidebar_menu.js @@ -56,9 +56,9 @@ let Icon; if (appLogo && !hasImageExtension) { - Icon = ''; + Icon = ''; } else { - Icon = ''; + Icon = ''; } 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 += ""; - 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); \ No newline at end of file + })(Drupal, once); diff --git a/api_pastell_pleiade/js/api_pastell_menu.js b/api_pastell_pleiade/js/api_pastell_menu.js index 9c0a1c4..2441759 100644 --- a/api_pastell_pleiade/js/api_pastell_menu.js +++ b/api_pastell_pleiade/js/api_pastell_menu.js @@ -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="">\ \ + Lister les documents\ \ + Créer un document\ '; } // Set the menu_a_remplir as innerHTML of menu_Pastell menu_Pastell.innerHTML = menu_a_remplir - feather.replace(); + } } diff --git a/api_zimbra_pleiade/js/api_zimbra_add_img_user_pleiade.js b/api_zimbra_pleiade/js/api_zimbra_add_img_user_pleiade.js index 7290b25..8496a37 100644 --- a/api_zimbra_pleiade/js/api_zimbra_add_img_user_pleiade.js +++ b/api_zimbra_pleiade/js/api_zimbra_add_img_user_pleiade.js @@ -51,10 +51,6 @@ }; xhr.onloadend = function () { - - - // feather icons - feather.replace(); }; xhr.send(); diff --git a/api_zimbra_pleiade/js/api_zimbra_agenda_pleiade.js b/api_zimbra_pleiade/js/api_zimbra_agenda_pleiade.js index 3d254b7..584964c 100644 --- a/api_zimbra_pleiade/js/api_zimbra_agenda_pleiade.js +++ b/api_zimbra_pleiade/js/api_zimbra_agenda_pleiade.js @@ -93,10 +93,6 @@ for (var k = 0; k < donneesArray.length; k++) { }; xhr.onloadend = function () { - - - // feather icons - feather.replace(); }; xhr.send(); diff --git a/api_zimbra_pleiade/js/api_zimbra_pleiade.js b/api_zimbra_pleiade/js/api_zimbra_pleiade.js index 2477f56..7eb815d 100644 --- a/api_zimbra_pleiade/js/api_zimbra_pleiade.js +++ b/api_zimbra_pleiade/js/api_zimbra_pleiade.js @@ -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 = - '
\ + 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 = + '
\
\
\

Boite de réception

\ @@ -30,86 +40,96 @@ var linkEntitie = \ '; + 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 += '\ + linkEntitie += + '\ \ - \ + \ \ - \ + \ \ \ '; - - } - } - else - { - var linkEntitie = '
\ -
\ -
\ -

Boite de réception

\ -
\ -
\ -

Aucun nouveau mail

\ -
\ -
\ -
\ - '; - } - -} -linkEntitie += '
'+ donnees.userData.Body.SearchResponse.c[i].e[0].p +'' + + donnees.userData.Body.SearchResponse.c[i].e[0].p + + '\ - '+ donnees.userData.Body.SearchResponse.c[i].su +'\ - '+ donnees.userData.Body.SearchResponse.c[i].fr.substr(0,65)+'... ' +'\ + ' + + donnees.userData.Body.SearchResponse.c[i].su + + '\ + ' + + donnees.userData.Body.SearchResponse.c[i].fr.substr(0, 65) + + "... " + + '\ ' + String(objectDate.getHours()).padStart(2, "0") + - ":" + - String(objectDate.getMinutes()).padStart(2, "0") + - '' + + String(objectDate.getHours()).padStart(2, "0") + + ":" + + String(objectDate.getMinutes()).padStart(2, "0") + + '\ - \ + \
\ -
\ -
\ -
\ - \ - ' -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 = + '
\ +
\ +
\ +

Boite de réception

\ +
\ +
\ +

Aucun nouveau mail

\ +
\ +
\ +
\ + '; + } + } + linkEntitie += + "\ + \ + \ + \ + \ + "; + 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); diff --git a/datatable_pleiade/js/datatable_pleiade.js b/datatable_pleiade/js/datatable_pleiade.js index 93a4fda..31e046b 100644 --- a/datatable_pleiade/js/datatable_pleiade.js +++ b/datatable_pleiade/js/datatable_pleiade.js @@ -123,7 +123,7 @@ var lien_nc_detail = ''; + '">'; var document_row = "\ \ @@ -141,7 +141,7 @@ "\
\ \