|
@@ -178,25 +178,27 @@ jQuery(function ($) {
|
|
});
|
|
});
|
|
|
|
|
|
// Scroll automatique au filtre
|
|
// Scroll automatique au filtre
|
|
- 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" });
|
|
|
|
|
|
+ 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();
|
|
|
|
- }
|
|
|
|
|
|
+ // 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();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
});
|
|
});
|
|
- });
|
|
|
|
|
|
+ }
|
|
});
|
|
});
|