Skip to content
Snippets Groups Projects
Commit 12199966 authored by Alice Poggioli's avatar Alice Poggioli
Browse files

wIP : HELP.

parent bb8c6687
No related branches found
No related tags found
1 merge request!87Feature/add dealt with buttin
...@@ -372,9 +372,9 @@ jQuery(document).ready(function($) { ...@@ -372,9 +372,9 @@ jQuery(document).ready(function($) {
//MENTOR DASHBOARD************************************************************* //MENTOR DASHBOARD*************************************************************
window.setTimeout(() => { window.setTimeout(() => {
var forms = document.querySelectorAll("sib-form"); // var forms = document.querySelectorAll("sib-form");
forms.forEach(form => { // forms.forEach(form => {
form.addEventListener("populate", e => { // form.addEventListener("populate", e => {
var previewImage = document.querySelectorAll( var previewImage = document.querySelectorAll(
"sib-form-file input[name='preview_image']+input" "sib-form-file input[name='preview_image']+input"
); );
...@@ -386,7 +386,7 @@ jQuery(document).ready(function($) { ...@@ -386,7 +386,7 @@ jQuery(document).ready(function($) {
for (let item of previewImage) { for (let item of previewImage) {
item.addEventListener("change", loadFile); item.addEventListener("change", loadFile);
} }
}); // });
//Manage the accordion in request mentor dashboard. //Manage the accordion in request mentor dashboard.
var accRequest = document.querySelectorAll( var accRequest = document.querySelectorAll(
...@@ -398,19 +398,15 @@ jQuery(document).ready(function($) { ...@@ -398,19 +398,15 @@ jQuery(document).ready(function($) {
accRequest[i].addEventListener("click", function() { accRequest[i].addEventListener("click", function() {
/* Toggle between adding and removing the "active" class, /* Toggle between adding and removing the "active" class,
to highlight the button that controls the panel */ to highlight the button that controls the panel */
//this.classList.toggle("active");
console.log(this);
console.log("hello");
if (this.classList.contains("active") == true) { if (this.classList.contains("active") == true) {
this.classList.remove("active"); this.classList.remove("active");
//this.nextElementSibling.querySelector("sib-form + div").style.maxHeight = "0px";
} else { } else {
this.classList.add("active"); this.classList.add("active");
} }
/* Toggle between hiding and showing the active panel */ /* Toggle between hiding and showing the active panel */
var panelRequest = this.nextElementSibling; var panelRequest = this.nextElementSibling;
if (!this.classList.contain("active")) { if (!this.classList.contains("active")) {
panelRequest.style.maxHeight = null; panelRequest.style.maxHeight = null;
refreshPagination(); refreshPagination();
...@@ -442,8 +438,8 @@ jQuery(document).ready(function($) { ...@@ -442,8 +438,8 @@ jQuery(document).ready(function($) {
}) })
); );
}); });
} // }
}); };
}, 3000); }, 3000);
//ENTREPRENEUR DASHBOARD************************************************************* //ENTREPRENEUR DASHBOARD*************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment