bouton tout-voir
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -5781,8 +5781,6 @@ svg.ext {
|
||||
position: relative;
|
||||
left: 60vw;
|
||||
top: -1.5rem;
|
||||
}
|
||||
.path-ressources .layout-content .region-content #block-contenudelapageprincipale .layout--onecol .layout__region--content .block-region-content .block-views-blockbase-de-donnees-block-1 .view-base-de-donnees .view-content .view-type-slide:not(footer) .tout-voir a {
|
||||
text-transform: uppercase;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -396,6 +396,42 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
});
|
||||
////////////////// end boutons media ////////////////
|
||||
|
||||
////////////////// start bouton "Tout voir" ////////////////
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const toutVoirButtons = document.querySelectorAll('.tout-voir');
|
||||
|
||||
toutVoirButtons.forEach(button => {
|
||||
button.addEventListener('click', function () {
|
||||
const tid = this.dataset.tid;
|
||||
const select = document.getElementById('edit-field-type-de-ressource-target-id');
|
||||
|
||||
if (!select) return;
|
||||
|
||||
const optionExists = Array.from(select.options).some(o => o.value === tid);
|
||||
if (!optionExists) {
|
||||
alert("Le type de ressource sélectionné n’est pas disponible.");
|
||||
return;
|
||||
}
|
||||
|
||||
select.value = tid;
|
||||
select.dispatchEvent(new Event('change'));
|
||||
|
||||
const form = select.closest('form');
|
||||
if (form) {
|
||||
const submitButton = form.querySelector('input[type="submit"]');
|
||||
if (submitButton) {
|
||||
submitButton.click();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
////////////////// end bouton "Tout voir" ////////////////
|
||||
|
||||
|
||||
|
||||
////////////// start croix clear input recherche ////////////
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
left: 60vw;
|
||||
top: -1.5rem;
|
||||
// margin-top: 1rem;
|
||||
a{
|
||||
// button{
|
||||
text-transform: uppercase;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 500;
|
||||
@@ -568,7 +568,7 @@
|
||||
// // display: block;
|
||||
// content: url('data:image/svg+xml,<svg width="40" height="20" xmlns="http://www.w3.org/2000/svg" version="1.1"><polyline points="71.9,49 24.3,49 24.3,51 71.9,51 58.1,64.8 59.5,66.2 75.7,50 59.5,33.8 58.1,35.2" transform="scale(0.5) translate(0,-25)" fill="rgb(0,158,227)" stroke="rgb(0,158,227)" stroke-width="0.7"/></svg>');
|
||||
// }
|
||||
}
|
||||
// }
|
||||
@media (max-width: 810px){
|
||||
left: 81vw;
|
||||
// top: -4.3rem;
|
||||
|
||||
@@ -28,10 +28,11 @@
|
||||
<div class="border"> </div>
|
||||
<h3 class="{{ type_class }}">{{ group.label }}</h3>
|
||||
{% if group.tid is defined %}
|
||||
<button class="tout-voir" type="button">
|
||||
<a href="{{ base_url }}?field_type_de_media_target_id=All&field_type_de_ressource_target_id={{ group.tid }}&field_mots_clefs_target_id=All&field_date_de_parution_value=&combine=" target="_blank" rel="noopener noreferrer">
|
||||
<button class="tout-voir" type="button" data-tid="{{ group.tid }}">
|
||||
{# <a href="{{ base_url }}?field_type_de_media_target_id=All&field_type_de_ressource_target_id={{ group.tid }}&field_mots_clefs_target_id=All&field_date_de_parution_value=&combine=" target="_blank" rel="noopener noreferrer">
|
||||
Tout voir
|
||||
</a>
|
||||
</a> #}
|
||||
Tout voir
|
||||
</button>
|
||||
{% endif %}
|
||||
<div class="views-row-wrapper">
|
||||
|
||||
Reference in New Issue
Block a user