Module fixes

e_collectivites-version
Romain_L 1 year ago
parent f48bea4f11
commit 15ffa8124c
  1. 2
      api_lemon_pleiade/js/api_lemon_pleiade_sidebar_menu.js
  2. 8
      api_moodle_pleiade/css/api_moodle_pleiade.css
  3. 13
      api_user_pleiade/css/api_user_pleiade.css
  4. 4
      api_user_pleiade/src/Controller/PleiadeUserController.php
  5. 6
      api_zimbra_pleiade/css/api_zimbra_pleiade.css
  6. 55
      datatable_pleiade/src/Controller/DatatableController.php
  7. 9
      module_api_pleiade/src/ApiPleiadeManager.php
  8. 56
      module_general_pleiade/js/module_general_pleiade.js
  9. 2
      module_postit_pleiade/js/post_it_table.js

@ -145,7 +145,7 @@
// Écouteur d'événement pour charger l'état de l'accordéon au chargement de la page // Écouteur d'événement pour charger l'état de l'accordéon au chargement de la page
// window.addEventListener('load', toggleAccordion); // window.addEventListener('load', toggleAccordion);
} }
document.getElementById('spinner-div-sidebar').style.display = 'none'; // document.getElementById('spinner-div-sidebar').style.display = 'none';
}; };
xhr.send(JSON.stringify({})); xhr.send(JSON.stringify({}));

@ -1,5 +1,11 @@
:root {
--global-color: #1f3889;
}
.btn-e-coll{ .btn-e-coll{
background-color: #1f3889!important; background-color: var(--global-color)!important;
} }
.card-img-top { .card-img-top {

@ -1,12 +1,7 @@
:root {
/* .alert_popup svg:hover { --global-color: #1f3889;
transform: scale(1.3); }
} */
/* .alert_popup svg {
transition: transform .2s;
} */
.notification_scale{ .notification_scale{
animation: pulse 1s infinite ease-in-out alternate; animation: pulse 1s infinite ease-in-out alternate;
} }
@ -540,7 +535,7 @@ body[data-theme=dark] .btn-accessibility{
} }
.btn-accessibility { .btn-accessibility {
background: none!important; background: none!important;
color: #1f3889!important; color: var(--global-color)!important;
border: none!important; border: none!important;
padding: 0!important; padding: 0!important;
} }

@ -34,6 +34,10 @@ class PleiadeUserController extends ControllerBase {
if (!empty($picture_fid)) { if (!empty($picture_fid)) {
$picture_url = file_create_url(\Drupal\file\Entity\File::load($picture_fid)->getFileUri()); $picture_url = file_create_url(\Drupal\file\Entity\File::load($picture_fid)->getFileUri());
} }
else
{
$picture_url = '/themes/custom/pleiadebv/assets/images/users/img_user.png';
}
} }
// Get user's last login timestamp. // Get user's last login timestamp.

@ -1,3 +1,7 @@
:root {
--global-color: #1f3889;
}
.fc-scrollgrid-sync-table, .fc-scrollgrid-section-header { .fc-scrollgrid-sync-table, .fc-scrollgrid-section-header {
display: none; display: none;
} }
@ -74,7 +78,7 @@ tbody .fc-scrollgrid-section:first-child {
border: inherit !important; border: inherit !important;
border-left: 3px solid var(--fc-event-bg-color); border-left: 3px solid var(--fc-event-bg-color);
opacity: 0.88; opacity: 0.88;
background-color: #1f3889 !important; background-color: var(--global-color) !important;
} }
.fc-timegrid-event, .fc-timegrid-more-link { .fc-timegrid-event, .fc-timegrid-more-link {

@ -34,35 +34,38 @@ class DatatableController extends ControllerBase {
$nextcloudataApi = new ApiPleiadeManager(); $nextcloudataApi = new ApiPleiadeManager();
$return = $nextcloudataApi->getNextcloudNotifs(); $return = $nextcloudataApi->getNextcloudNotifs();
$data = $return->ocs->data; // Access the 'data' property of the object
if($return){
$data = $return->ocs->data; // Access the 'data' property of the object
foreach ($data as $item) {
if (!isset($item->subjectRichParameters->file)) {
continue; // Skip the iteration if 'file' is not present
}
foreach ($data as $item) { $status = '';
if (!isset($item->subjectRichParameters->file)) { if (strpos($item->subject, 'modif') !== false) {
continue; // Skip the iteration if 'file' is not present $status = 'Modifié';
} } elseif (strpos($item->subject, 'partag') !== false) {
$status = 'Partagé';
$status = ''; }
if (strpos($item->subject, 'modif') !== false) {
$status = 'Modifié'; $fileUrl = isset($item->subjectRichParameters->file->link) ? $item->subjectRichParameters->file->link : null;
} elseif (strpos($item->subject, 'partag') !== false) { $fileName = isset($item->subjectRichParameters->file->name) ? $item->subjectRichParameters->file->name : null;
$status = 'Partagé';
$formattedItem = [
'type' => 'Nextcloud',
'titre' => $fileName,
'creation' => date('d/m/Y H:i', strtotime($item->datetime)),
// 'subject' => $item->subject,
'status' => $status,
'fileUrl' => $fileUrl
];
$formattedData[] = $formattedItem;
} }
$fileUrl = isset($item->subjectRichParameters->file->link) ? $item->subjectRichParameters->file->link : null;
$fileName = isset($item->subjectRichParameters->file->name) ? $item->subjectRichParameters->file->name : null;
$formattedItem = [
'type' => 'Nextcloud',
'titre' => $fileName,
'creation' => date('d/m/Y H:i', strtotime($item->datetime)),
// 'subject' => $item->subject,
'status' => $status,
'fileUrl' => $fileUrl
];
$formattedData[] = $formattedItem;
} }
$jsonData = json_encode($formattedData); // Convert the array to a JSON string $jsonData = json_encode($formattedData); // Convert the array to a JSON string
return new JsonResponse($jsonData, 200, [], true); return new JsonResponse($jsonData, 200, [], true);

@ -489,6 +489,7 @@ class ApiPleiadeManager {
$endpoints = $this->settings_pastell->get('field_pastell_entities_url'); $endpoints = $this->settings_pastell->get('field_pastell_entities_url');
// \Drupal::logger('api_pastell_entites')->info('function searchMyentities triggered !'); // \Drupal::logger('api_pastell_entites')->info('function searchMyentities triggered !');
return $this->curlGet($endpoints, [], $this->settings_pastell->get('field_pastell_url') . $this->settings_pastell->get('field_pastell_entities_url'), 'pastell' ); return $this->curlGet($endpoints, [], $this->settings_pastell->get('field_pastell_url') . $this->settings_pastell->get('field_pastell_entities_url'), 'pastell' );
// return $this->curlGet($endpoints, [], $this->settings_pastell->get('field_pastell_url') . $this->settings_pastell->get('field_pastell_entities_url'), 'pastell' );
} }
@ -548,9 +549,11 @@ class ApiPleiadeManager {
public function getNextcloudNotifs() { public function getNextcloudNotifs() {
$moduleHandler = \Drupal::service('module_handler');
$endpoints = $this->settings_nextcloud->get('nextcloud_endpoint_notifs'); // Endpoint myapplications de Lemon qui renvoie toutes nos apps if ($moduleHandler->moduleExists('api_nextcloud_pleiade')) {
return $this->curlGet([], [], $this->settings_nextcloud->get('nextcloud_url') . $endpoints .'?format=json' , 'nextcloud'); $endpoints = $this->settings_nextcloud->get('nextcloud_endpoint_notifs'); // Endpoint myapplications de Lemon qui renvoie toutes nos apps
return $this->curlGet([], [], $this->settings_nextcloud->get('nextcloud_url') . $endpoints .'?format=json' , 'nextcloud');
}
} }
/** /**

@ -8,59 +8,11 @@
) { ) {
once("ParamsGenBehavior", "body", context).forEach(function () { once("ParamsGenBehavior", "body", context).forEach(function () {
if (settings.module_general_pleiade.color_theme) { if (settings.module_general_pleiade.color_theme) {
var newColorCode = settings.module_general_pleiade.color_theme; var newColorCode = settings.module_general_pleiade.color_theme;
var elements = document.querySelectorAll( const rootElement = document.documentElement;
"#post_it_dashboad button, button#delete-button, .customizer .customizer-tab .nav-item .nav-link:hover, .customizer .customizer-tab .nav-item .nav-link.active, a.text-white.btn.d-block.w-100.my-2.rounded-pill, .page-item.active .page-link, a.text-white.btn.d-block.w-50.rounded-pill, .d-flex.no-block.align-items-center.p-3.text-white.mb-2, #main-wrapper[data-layout=vertical] .topbar .top-navbar .navbar-header, .customizer .service-panel-toggle, #main-wrapper[data-layout=vertical] .left-sidebar, #main-wrapper[data-layout=vertical] .left-sidebar ul, #main-wrapper[data-layout=horizontal] .left-sidebar, #main-wrapper[data-layout=horizontal] .left-sidebar ul" // Modify CSS properties
); rootElement.style.setProperty("--global-color", newColorCode);
var elements_2 = document.querySelectorAll(
".customizer .customizer-tab .nav-item .nav-link, svg.feather.feather-bell.feather-sm, .customizer .customizer-tab .nav-item .nav-link:hover, .customizer .customizer-tab .nav-item .nav-link.active"
);
var navLinks = document.querySelectorAll(" .page-item.active .page-link, .customizer .customizer-tab .nav-item .nav-link");
navLinks.forEach(function(navLink) {
navLink.addEventListener("click", function() {
// Reset the background color of all nav links
navLinks.forEach(function(link) {
link.style.background = "";
});
// Set the background color of the clicked nav link
this.style.background = newColorCode;
});
});
for (var i = 0; i < elements.length; i++) {
elements[i].style.background = newColorCode;
}
for (var i = 0; i < elements_2.length; i++) {
elements_2[i].style.color = newColorCode;
elements_2[i].style.borderBottomColor = newColorCode;
}
const button = document.querySelector(
'#post_it_dashboard'
);
const propertiesToReplace = ["border"];
if(button){
const computedStyle = window.getComputedStyle(button);
for (let property of propertiesToReplace) {
const originalValue = computedStyle[property];
const replacedValue = replaceRGB(
originalValue,
"rgb(31, 56, 137)",
newColorCode
);
button.style[property] = replacedValue;
}
}
function replaceRGB(value, rgbColor, replacement) {
return value.replace(rgbColor, replacement);
}
} }
}); // end once }); // end once

@ -43,7 +43,7 @@
// Add CSS properties for overflow // Add CSS properties for overflow
p.style.overflow = "hidden"; p.style.overflow = "hidden";
p.style.overflowY = "scroll"; p.style.overflowY = "scroll";
p.style.cursor = "default"; p.style.cursor = "grab";
p.style.fontSize = "12px"; p.style.fontSize = "12px";
item.appendChild(p); item.appendChild(p);

Loading…
Cancel
Save