Bug #5010
Masquer le champs commentaire de la pause facturation, afficher avec un bouton et indiquer quand il y a un commentaire.
Status:
Fermé
Priority:
Normal
Assignee:
Jérôme Schneider
Target version:
Start date:
20 June 2014
Due date:
% Done:
90%
Estimated time:
Patch proposed:
Yes
Planning:
Files
Associated revisions
History
Updated by Jérôme Schneider over 8 years ago
- Assignee set to Jérôme Schneider
- Patch proposed set to No
Updated by Jérôme Schneider over 8 years ago
- File 0001-dossiers-render-pause-facturation-comment-expandable.patch 0001-dossiers-render-pause-facturation-comment-expandable.patch added
- Status changed from Nouveau to En cours
- % Done changed from 0 to 60
- Patch proposed changed from No to Yes
Updated by Benjamin Dauvergne over 8 years ago
J'aurai plutôt utilisé jQuery.toggleClass()
et beaucoup de CSS pour en faire un truc plus générique utilisable partout, par exemple:
Pour la structure HTML:
<div class="js-expandable"> <label class="js-click-to-expand">Infos d'assuré</label> <div class="js-to-expand"> .... </div> </div>
Pour la CSS:
.js-expandable .js-click-to-expand:after { content: " [-]" } .js-expendable.js-expanded .js-click-to-expand:after { content: " [+]" } .js-expandable .js-to-expand { display: none; } .js-expandable.js-expanded .js-to-expand { display: block; }
Et pour le JS:
$(document).on('click', '.js-click-to-expand', function (event) { $(event.target).parents('.js-expandable').toggleClass('js-expanded'); });
Je n'ai pas testé mais l'esprit est là.
Updated by Benjamin Dauvergne over 8 years ago
On doit aussi pouvoir faire ça sans JS du tout avec des URLs fragment:
<div id="coin" class="expandable"> <label class="to-hide"> <a href="#coin">label [-]</a> </label> <label class="to-show"> <a href="#">label [+]</a> </label> <div class="to-show"> </div> </div>
CSS:
.expandable .to-show { display: none } .expandable:target .to-show { display: block } .expandable:target .to-hide { display: none }
Et Fred doit pouvoir pondre une animation CSS pour avoir un bel effet accordéon.
Updated by Jérôme Schneider over 8 years ago
- File 0001-dossiers-render-pause-facturation-comment-expandable.patch added
Et voilà un patch qui tient compte de la remarque initiale. Pour l'effet accordéon ça attendra je pense.
Updated by Jérôme Schneider over 8 years ago
- File deleted (
0001-dossiers-render-pause-facturation-comment-expandable.patch)
Updated by Jérôme Schneider over 8 years ago
Updated by Jérôme Schneider over 8 years ago
- Status changed from En cours to Résolu (à déployer)
- % Done changed from 60 to 100
Appliqué par commit calebasse|commit:e8a1fe3143ad9d92a8b2806c8ef961d7b93f2732.
Updated by Mikaël Ates over 8 years ago
- Status changed from Résolu (à déployer) to En cours
- % Done changed from 100 to 50
Lorsque le commentaire est déroulé, il ne se "renroule" pas en cliquant sur 'Commentaire de la pause facturation [-]'.
Updated by Jérôme Schneider over 8 years ago
- Status changed from En cours to Résolu (à déployer)
- % Done changed from 50 to 90
C'était un bug avec Firefox. Je l'ai corrigé avec :
commit 91140baf5cb33f4f02a4bfbb1afa11bd5fe274e6 Author: Jérôme Schneider <jschneider@entrouvert.com> Date: Mon Aug 18 19:22:03 2014 +0200 fixes a toggle bug specific to Firefox
dossiers: render pause facturation comment expandable
Closes #5010