Browse Source

fix(formidable/120): Pour la saisie explication, seul le bouton d'affichage/masquage affiche/masque, pas les boutons du constructeur de formulaire.

Utilise les aria-attributs pour trouver le bon bouton.

fix spip-contrib-extensions/formidable#120
pull/217/head
Maïeul 8 months ago
parent
commit
3f2459cafe
  1. 5
      CHANGELOG.md
  2. 4
      saisies/explication.html

5
CHANGELOG.md

@ -1,4 +1,9 @@
# Changelog
## Unreleased
### Fix
- formidable/#120: Pour la saisie explication, seul le bouton d'affichage/masquage affiche/masque, pas les boutons du constructeur de formulaire.
## [4.4.1] - 2022-06-06

4
saisies/explication.html

@ -14,11 +14,11 @@
<script>
function masquer_#GET{selector}(){
$("[.(#GET{selector})] .explication_texte").#CONST{_SAISIES_AFFICHER_SI_JS_HIDE}.attr('aria-hidden','true');
$("[.(#GET{selector})] button").text('<:saisies:afficher:>').attr('aria-expanded', 'false');
$("[.(#GET{selector})] button\[aria-controls=#GET{selector}_texte\]").text('<:saisies:afficher:>').attr('aria-expanded', 'false');
};
function afficher_#GET{selector}(){
$("[.(#GET{selector})] .explication_texte").#CONST{_SAISIES_AFFICHER_SI_JS_SHOW}.attr('aria-hidden','false');
$("[.(#GET{selector})] button").text('<:saisies:masquer:>').attr('aria-expanded', 'true');
$("[.(#GET{selector})] button\[aria-controls=#GET{selector}_texte\]").text('<:saisies:masquer:>').attr('aria-expanded', 'true');
};
function basculer_#GET{selector}(){
if (est_masque_#GET{selector} == true) {

Loading…
Cancel
Save