console
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -178,25 +178,27 @@ jQuery(function ($) {
|
||||
});
|
||||
|
||||
// Scroll automatique au filtre
|
||||
const form = document.querySelector(".views-exposed-form");
|
||||
if (form) form.setAttribute("action", form.action.split("#")[0] + "#filtres");
|
||||
if (document.body.classList.contains("path-projets")) {
|
||||
const form = document.querySelector(".views-exposed-form");
|
||||
if (form) form.setAttribute("action", form.action.split("#")[0] + "#filtres");
|
||||
|
||||
if (window.location.hash === "#filtres") {
|
||||
const target = document.getElementById("filtres");
|
||||
if (target) {
|
||||
const offset = 300;
|
||||
const top = target.getBoundingClientRect().top + window.pageYOffset - offset;
|
||||
window.scrollTo({ top: top, behavior: "smooth" });
|
||||
}
|
||||
}
|
||||
|
||||
// MASQUER TYPE DE RESSOURCE DOUBLON
|
||||
$(".view-type-slide").each(function () {
|
||||
const h3Content = $(this).find("h3").text().trim();
|
||||
$(this).find(".field--name-field-type-de-ressource").each(function () {
|
||||
if ($(this).text().trim() === h3Content) {
|
||||
$(this).hide();
|
||||
if (window.location.hash === "#filtres") {
|
||||
const target = document.getElementById("filtres");
|
||||
if (target) {
|
||||
const offset = 300;
|
||||
const top = target.getBoundingClientRect().top + window.pageYOffset - offset;
|
||||
window.scrollTo({ top: top, behavior: "smooth" });
|
||||
}
|
||||
}
|
||||
|
||||
// MASQUER TYPE DE RESSOURCE DOUBLON
|
||||
$(".view-type-slide").each(function () {
|
||||
const h3Content = $(this).find("h3").text().trim();
|
||||
$(this).find(".field--name-field-type-de-ressource").each(function () {
|
||||
if ($(this).text().trim() === h3Content) {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user